summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-16 17:45:42 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-16 17:45:42 +0000
commit75a45ba2a4535af287da78766ea500964e8ef2b6 (patch)
tree83d0002bdf75ad4cb5df48af824166375955113d /clang/lib/Sema/SemaDeclObjC.cpp
parentde39198f9532f906ba7d65d29aa62ad97755477a (diff)
downloadbcm5719-llvm-75a45ba2a4535af287da78766ea500964e8ef2b6.tar.gz
bcm5719-llvm-75a45ba2a4535af287da78766ea500964e8ef2b6.zip
Adopt a more principled approach to invalid declarations:
- If a declaration is an invalid redeclaration of an existing name, complain about the invalid redeclaration then avoid adding it to the AST (we can still parse the definition or initializer, if any). - If the declaration is invalid but there is no prior declaration with that name, introduce the invalid declaration into the AST (for later error recovery). - If the declaration is an invalid redeclaration of a builtin that starts with __builtin_, we produce an error and drop the redeclaration. If it is an invalid redeclaration of a library builtin (e.g., malloc, printf), warn (don't error!) and drop the redeclaration. If a user attempts to define a builtin, produce an error and (if it's a library builtin like malloc) suggest -ffreestanding. This addresses <rdar://problem/6097585> and PR2892. However, PR3588 is still going to cause some problems when builtins are redeclared without a prototype. llvm-svn: 64639
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud