]> granicus.if.org Git - clang/commit
Use Sema's PrintingPolicy when diagnosing DeclSpecs.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 12 Mar 2015 14:28:38 +0000 (14:28 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 12 Mar 2015 14:28:38 +0000 (14:28 +0000)
commitdcf67b297855acdc921de1687c9c1b28222e9931
treee6915c04964db81f17c60dca6a10d960e1fb1cbc
parent8263fae10f64bea61092b08a40349ef3685aee8f
Use Sema's PrintingPolicy when diagnosing DeclSpecs.

Sema overrides ASTContext's policy on the first emitted diagnostic
(doesn't matter if it's ignored or not). This means changing the order
of diagnostic emission in Sema suddenly changes the text of diagnostic
emitted from the parser.

In the test case -Wmissing-prototypes (ignored) was the culprit, use
'int main' to suppress that warning so we see when this regresses.
Also move it into Sema/ as it's not testing any C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232039 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Parse/ParseDecl.cpp
test/Sema/pr9812.c [moved from test/SemaCXX/pr9812.c with 94% similarity]