llvm-project/clang/lib/AST
Alex Richardson a602f76a24 [clang][TargetInfo] Use LangAS for getPointer{Width,Align}()
Mixing LLVM and Clang address spaces can result in subtle bugs, and there
is no need for this hook to use the LLVM IR level address spaces.
Most of this change is just replacing zero with LangAS::Default,
but it also allows us to remove a few calls to getTargetAddressSpace().

This also removes a stale comment+workaround in
CGDebugInfo::CreatePointerLikeType(): ASTContext::getTypeSize() does
return the expected size for ReferenceType (and handles address spaces).

Differential Revision: https://reviews.llvm.org/D138295
2022-11-30 20:24:01 +00:00
..
Interp Revert "[clang][Interp] Use placement new to construct opcode args into vector" 2022-11-30 16:07:57 +01:00
APValue.cpp [clang] add APValue type check in `TryPrintAsStringLiteral` 2022-08-10 08:42:59 +08:00
ASTConcept.cpp Reapply "[Concepts] Recover properly from a RecoveryExpr in a concept" 2022-09-26 08:39:10 -07:00
ASTConsumer.cpp
ASTContext.cpp [clang][TargetInfo] Use LangAS for getPointer{Width,Align}() 2022-11-30 20:24:01 +00:00
ASTDiagnostic.cpp Fix duplicate word typos; NFC 2022-11-08 07:21:23 -05:00
ASTDumper.cpp [clang]: Add DeclContext::dumpAsDecl(). 2022-10-03 17:25:44 -04:00
ASTImporter.cpp Revert "Implement CWG2631" 2022-11-30 16:03:05 +01:00
ASTImporterLookupTable.cpp [clang][ASTImporter] Update lookup table correctly at deduction guides. 2021-12-06 20:40:16 +01:00
ASTStructuralEquivalence.cpp NFC: [clang] Template argument cleanups. 2022-10-25 00:29:56 +02:00
ASTTypeTraits.cpp [clang] Add `ObjCProtocolLoc` to represent protocol references 2022-02-18 15:24:00 -05:00
AttrDocTable.cpp [clang] Use std::size instead of llvm::array_lengthof 2022-09-08 17:20:25 -06:00
AttrImpl.cpp Fix declare target implementation to support enter. 2022-11-17 17:35:53 -06:00
CMakeLists.txt [ODRHash diagnostics] Move `ODRDiagsEmitter` to libAST in separate files. NFC. 2022-09-07 14:40:37 -07:00
CXXABI.h [clang] Remove unused forward declarations (NFC) 2022-01-08 11:56:40 -08:00
CXXInheritance.cpp [clang] Don't include SetVector.h (NFC) 2022-09-17 13:36:13 -07:00
Comment.cpp [clang][NFC] Use c++17 style variable type traits 2022-11-07 18:25:48 +00:00
CommentBriefParser.cpp [AST] Remove an unnecessary continue (NFC) 2021-12-11 23:04:08 -08:00
CommentCommandTraits.cpp [clang] Use std::size instead of llvm::array_lengthof 2022-09-08 17:20:25 -06:00
CommentLexer.cpp [Clang][Comments] Parse `<img src=""/>` in doc comments correctly 2022-09-01 13:17:42 +01:00
CommentParser.cpp Resolve overload ambiguity on Mac OS when printing size_t in diagnostics 2022-05-14 12:37:36 +02:00
CommentSema.cpp Comment parsing: Allow inline commands to have 0 or more than 1 argument 2022-05-13 13:48:46 +02:00
ComparisonCategories.cpp [clang] Fix a few more comment typos to cycle bots 2021-09-20 20:06:03 -04:00
ComputeDependence.cpp [clang] Improve error recovery for pack expansion of expressions 2022-10-31 17:57:13 +01:00
DataCollection.cpp
Decl.cpp Revert "Implement CWG2631" 2022-11-30 16:03:05 +01:00
DeclBase.cpp "Reapply "GH58368: Correct concept checking in a lambda defined in concept"" 2022-10-24 12:36:54 -07:00
DeclCXX.cpp [clang] Add [is|set]Nested methods to NamespaceDecl 2022-11-24 12:44:35 +00:00
DeclFriend.cpp
DeclGroup.cpp
DeclObjC.cpp [ODRHash] Detect duplicate `ObjCProtocolDecl` ODR mismatches during parsing. 2022-11-17 18:31:32 -08:00
DeclOpenMP.cpp
DeclPrinter.cpp Properly print unnamed TagDecl objects in diagnostics 2022-10-14 08:18:28 -04:00
DeclTemplate.cpp "Reapply "GH58368: Correct concept checking in a lambda defined in concept"" 2022-10-24 12:36:54 -07:00
DeclarationName.cpp [NFC][AST] Return underlying strings directly instead of OS.str() 2021-12-09 16:05:46 -08:00
Expr.cpp [clang] Implement -fstrict-flex-arrays=3 2022-10-27 10:50:04 -07:00
ExprCXX.cpp Revert "Implement CWG2631" 2022-11-30 16:03:05 +01:00
ExprClassification.cpp [HLSL] Added HLSL this as a reference 2022-11-07 13:50:08 -08:00
ExprConcepts.cpp "Reapply "GH58368: Correct concept checking in a lambda defined in concept"" 2022-10-24 12:36:54 -07:00
ExprConstant.cpp [Clang] Permit static constexpr variables in constexpr functions 2022-11-28 21:38:31 +01:00
ExprObjC.cpp [clang] NFC: refactor multiple implementations of getDecltypeForParenthesizedExpr 2021-07-28 23:27:43 +02:00
ExternalASTMerger.cpp [clang] Use llvm::erase_if (NFC) 2021-10-17 13:50:29 -07:00
ExternalASTSource.cpp
FormatString.cpp [HLSL] Disable integer promotion to avoid int16_t being promoted to int for HLSL. 2022-10-20 16:06:25 -07:00
FormatStringParsing.h
InheritViz.cpp
ItaniumCXXABI.cpp [clang][TargetInfo] Use LangAS for getPointer{Width,Align}() 2022-11-30 20:24:01 +00:00
ItaniumMangle.cpp [clang] Add [is|set]Nested methods to NamespaceDecl 2022-11-24 12:44:35 +00:00
JSONNodeDumper.cpp [clang] Add [is|set]Nested methods to NamespaceDecl 2022-11-24 12:44:35 +00:00
Linkage.h
Mangle.cpp [clang][TargetInfo] Use LangAS for getPointer{Width,Align}() 2022-11-30 20:24:01 +00:00
MicrosoftCXXABI.cpp [clang][TargetInfo] Use LangAS for getPointer{Width,Align}() 2022-11-30 20:24:01 +00:00
MicrosoftMangle.cpp [clang][TargetInfo] Use LangAS for getPointer{Width,Align}() 2022-11-30 20:24:01 +00:00
NSAPI.cpp [Clang] Add __ibm128 type to represent ppc_fp128 2021-09-06 18:00:58 +08:00
NestedNameSpecifier.cpp Properly print unnamed TagDecl objects in diagnostics 2022-10-14 08:18:28 -04:00
ODRDiagsEmitter.cpp [ODRHash] Detect duplicate `ObjCProtocolDecl` ODR mismatches during parsing. 2022-11-17 18:31:32 -08:00
ODRHash.cpp [ODRHash] Hash `ObjCPropertyDecl` and diagnose discovered mismatches. 2022-11-17 17:22:03 -08:00
OSLog.cpp [Clang] Rename StringLiteral::isAscii() => isOrdinary() [NFC] 2022-06-29 18:28:51 +02:00
OpenMPClause.cpp [OPENMP5.1] Initial support for message clause. 2022-11-18 17:59:23 -08:00
ParentMap.cpp Use DenseMap::lookup (NFC) 2021-12-17 18:19:25 -08:00
ParentMapContext.cpp [AST] Use std::apply to pop front of tuples. NFCI. 2022-08-25 00:03:08 +02:00
PrintfFormatString.cpp [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
QualTypeNames.cpp NFC: [clang] Template argument cleanups. 2022-10-25 00:29:56 +02:00
Randstruct.cpp [randstruct] Randomize all elements of a record 2022-04-28 12:01:11 -07:00
RawCommentList.cpp [clang][extract-api] Add global record support 2022-03-16 15:13:55 -07:00
RecordLayout.cpp
RecordLayoutBuilder.cpp [clang][TargetInfo] Use LangAS for getPointer{Width,Align}() 2022-11-30 20:24:01 +00:00
ScanfFormatString.cpp [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
SelectorLocationsKind.cpp
Stmt.cpp [FPEnv] Allow CompoundStmt to keep FP options 2022-07-03 17:06:26 +07:00
StmtCXX.cpp [C++20] [Coroutines] Implement return value optimization for get_return_object 2022-02-16 13:38:00 +08:00
StmtIterator.cpp
StmtObjC.cpp [clang] Convert ObjCAtTryStmt to llvm::TrailingObjects 2021-10-27 08:57:05 -04:00
StmtOpenMP.cpp [OPENMP]Initial support for error directive. 2022-11-02 14:25:28 -07:00
StmtPrinter.cpp [OPENMP]Initial support for error directive. 2022-11-02 14:25:28 -07:00
StmtProfile.cpp [OPENMP5.1] Initial support for message clause. 2022-11-18 17:59:23 -08:00
StmtViz.cpp
TemplateBase.cpp Disambiguate type names when printing NTTP types 2022-10-28 08:18:38 -04:00
TemplateName.cpp [clang] Implement sugared substitution changes to infrastructure 2022-10-27 06:18:07 +02:00
TextNodeDumper.cpp [clang] Add [is|set]Nested methods to NamespaceDecl 2022-11-24 12:44:35 +00:00
Type.cpp [clang] Implement sugared substitution changes to infrastructure 2022-10-27 06:18:07 +02:00
TypeLoc.cpp NFC: [clang] Template argument cleanups. 2022-10-25 00:29:56 +02:00
TypePrinter.cpp [NFC] clang-format part of TypePrinter.cpp 2022-11-07 13:20:36 -08:00
VTTBuilder.cpp
VTableBuilder.cpp [clang][TargetInfo] Use LangAS for getPointer{Width,Align}() 2022-11-30 20:24:01 +00:00