summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Frontend/FrontendActionTest.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2013-12-15 10:36:26 +0000
committerAlp Toker <alp@nuanti.com>2013-12-15 10:36:26 +0000
commit56b5cc91afcbc1eeb9c84cae83d2d50beba391f0 (patch)
tree9bd1d6b9fa26a2e7a07ccb3811db0a5404223850 /clang/unittests/Frontend/FrontendActionTest.cpp
parente31b486cddf7fa069f56882319400c5003425095 (diff)
downloadbcm5719-llvm-56b5cc91afcbc1eeb9c84cae83d2d50beba391f0.tar.gz
bcm5719-llvm-56b5cc91afcbc1eeb9c84cae83d2d50beba391f0.zip
ASTContext: Declare builtin types implicitly
__builtin_va_list and friends have been showing up where they shouldn't for way to long, making unwanted appearences in -ast-print, tooling and source level visitors and even the hello world tutorial on the clang website. This commit factors down the implicit typedef and record creation facilities to ensure they're marked implicit. Also fixes a unit test that was testing incorrect behaviour, and removes old hacks in the DeclPrinter that tried to skip implicit declarations manually. llvm-svn: 197336
Diffstat (limited to 'clang/unittests/Frontend/FrontendActionTest.cpp')
-rw-r--r--clang/unittests/Frontend/FrontendActionTest.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/clang/unittests/Frontend/FrontendActionTest.cpp b/clang/unittests/Frontend/FrontendActionTest.cpp
index 1871a2f567f..e39d00f6af3 100644
--- a/clang/unittests/Frontend/FrontendActionTest.cpp
+++ b/clang/unittests/Frontend/FrontendActionTest.cpp
@@ -76,10 +76,9 @@ TEST(ASTFrontendAction, Sanity) {
TestASTFrontendAction test_action;
ASSERT_TRUE(compiler.ExecuteAction(test_action));
- ASSERT_EQ(3U, test_action.decl_names.size());
- EXPECT_EQ("__builtin_va_list", test_action.decl_names[0]);
- EXPECT_EQ("main", test_action.decl_names[1]);
- EXPECT_EQ("x", test_action.decl_names[2]);
+ ASSERT_EQ(2U, test_action.decl_names.size());
+ EXPECT_EQ("main", test_action.decl_names[0]);
+ EXPECT_EQ("x", test_action.decl_names[1]);
}
TEST(ASTFrontendAction, IncrementalParsing) {
@@ -96,10 +95,9 @@ TEST(ASTFrontendAction, IncrementalParsing) {
TestASTFrontendAction test_action(/*enableIncrementalProcessing=*/true);
ASSERT_TRUE(compiler.ExecuteAction(test_action));
- ASSERT_EQ(3U, test_action.decl_names.size());
- EXPECT_EQ("__builtin_va_list", test_action.decl_names[0]);
- EXPECT_EQ("main", test_action.decl_names[1]);
- EXPECT_EQ("x", test_action.decl_names[2]);
+ ASSERT_EQ(2U, test_action.decl_names.size());
+ EXPECT_EQ("main", test_action.decl_names[0]);
+ EXPECT_EQ("x", test_action.decl_names[1]);
}
} // anonymous namespace
OpenPOWER on IntegriCloud