diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-10-04 01:49:22 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-10-04 01:49:22 +0000 |
commit | 9bfa970a40095db93018a0b16a48e2710dab0d9e (patch) | |
tree | e2b5213b22b4a5aff230467f7adb82f2e5e00bca /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | 83fd6a1243d2c704332ca7633c2d4ebe02b4a86d (diff) | |
download | bcm5719-llvm-9bfa970a40095db93018a0b16a48e2710dab0d9e.tar.gz bcm5719-llvm-9bfa970a40095db93018a0b16a48e2710dab0d9e.zip |
PR34822: Fix a collection of related bugs with our handling of C89 implicit function declarations.
We were injecting the function into the wrong semantic context, resulting in it
failing to be registered as a global for redeclaration lookup. As a
consequence, we accepted invalid code since r310616.
Fixing that resulted in the "out-of-scope declaration" diagnostic firing a lot
more often. It turned out that warning codepath was non-conforming, because it
did not cause us to inject the implicitly-declared function into the enclosing
block scope. We now only warn if the type of the out-of-scope declaration
doesn't match the type of an implicitly-declared function; in all other cases,
we produce the normal warning for an implicitly-declared function.
llvm-svn: 314871
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
0 files changed, 0 insertions, 0 deletions