summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/ctu-main.cpp
diff options
context:
space:
mode:
authorBalazs Keri <1.int32@gmail.com>2019-08-16 12:10:03 +0000
committerBalazs Keri <1.int32@gmail.com>2019-08-16 12:10:03 +0000
commite13e836480fc8acbcef3b3fb9c4bee74083c6f6a (patch)
tree62db7e7901a20f71ac768d6a0a56de9a738bc331 /clang/test/Analysis/ctu-main.cpp
parentd3f774d33cd19570d6b3350bf4a2adc856090906 (diff)
downloadbcm5719-llvm-e13e836480fc8acbcef3b3fb9c4bee74083c6f6a.tar.gz
bcm5719-llvm-e13e836480fc8acbcef3b3fb9c4bee74083c6f6a.zip
[ASTImporter] Import ctor initializers after setting flags.
Summary: Code to import "ctor initializers" at import of functions is moved to be after the flags in the newly created function are imported. This fixes an error when the already created but incomplete (flags are not set) function declaration is accessed. Reviewers: martong, shafik, a_sidorin, a.sidorin Reviewed By: shafik Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65935 llvm-svn: 369098
Diffstat (limited to 'clang/test/Analysis/ctu-main.cpp')
-rw-r--r--clang/test/Analysis/ctu-main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Analysis/ctu-main.cpp b/clang/test/Analysis/ctu-main.cpp
index c4aee409ee2..abfacfbdae5 100644
--- a/clang/test/Analysis/ctu-main.cpp
+++ b/clang/test/Analysis/ctu-main.cpp
@@ -127,6 +127,8 @@ public:
extern int testImportOfIncompleteDefaultParmDuringImport(int);
+extern int testImportOfDelegateConstructor(int);
+
int main() {
clang_analyzer_eval(f(3) == 2); // expected-warning{{TRUE}}
clang_analyzer_eval(f(4) == 3); // expected-warning{{TRUE}}
@@ -163,4 +165,6 @@ int main() {
clang_analyzer_eval(TestAnonUnionUSR::Test == 5); // expected-warning{{TRUE}}
clang_analyzer_eval(testImportOfIncompleteDefaultParmDuringImport(9) == 9); // expected-warning{{TRUE}}
+
+ clang_analyzer_eval(testImportOfDelegateConstructor(10) == 10); // expected-warning{{TRUE}}
}
OpenPOWER on IntegriCloud