aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-02 01:23:29 +0000
committerChris Lattner <sabre@nondot.org>2010-02-02 01:23:29 +0000
commit4ed5d91db256f7dbe6bf716da0b801004c197254 (patch)
treefb52567278671cb373c0788a76611c4c00ca0e26 /lib/CodeGen/CGExprConstant.cpp
parentae50d501f463d7032320ec31840f60ae68df3a55 (diff)
Implement PR6180, substantially improving the diagnostics we get from
forgetting a ';' at the end of a struct. For something like: class c { } void foo() {} we now produce: t.cc:3:2: error: expected ';' after class } ^ ; instead of: t.cc:4:1: error: cannot combine with previous 'class' declaration specifier void foo() {} ^ t.cc:2:7: error: 'class c' can not be defined in the result type of a function class c { ^ GCC produces: t.cc:4: error: new types may not be defined in a return type t.cc:4: note: (perhaps a semicolon is missing after the definition of ‘c’) t.cc:4: error: two or more data types in declaration of ‘foo’ I *think* I got the follow set right, but if I forgot anything, we'll start getting spurious "expected ';' after class" errors, let me know if you see any. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95042 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
0 files changed, 0 insertions, 0 deletions