Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang][ASTImporter] Add VaList declaration to lookup table.
The declaration of __builtin_va_list seems to be handled specially by ASTContext and/or Sema. The normal AST traversal probably can not find it, therefore it is not added to ASTImporterLookupTable. If it is not added, errors can occur because a duplicated VaList declaration is created at import. To fix the problem the VaList declaration is added manually to ASTImporterLookupTable at construction. In special cases this declaration is inside a "invisible" 'std' namespace that behaves the same way. This namespace must be added to the table too. Reviewed By: vabridgers, donat.nagy Differential Revision: https://reviews.llvm.org/D144273
- Loading branch information
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
int f(int N) { | ||
return N; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// RUN: clang-import-test -import %S/Inputs/I1.cpp -expression %s | ||
|
||
void expr() { | ||
f(0); | ||
} | ||
|
||
int std = 17; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters