Add missing diagnostic for use of _reserved name in extern "C"
authorRichard Smith <richard@metafoo.co.uk>
Wed, 6 Oct 2021 22:11:12 +0000 (15:11 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Wed, 6 Oct 2021 22:13:06 +0000 (15:13 -0700)
commit141df744564822b8d8250fe1bcec15cdbd5f213e
tree9fe45024df73c87d9eaf8afaa6804055de65451a
parent7063b76b02484f93104f1c79496ad216b9bf5b87
Add missing diagnostic for use of _reserved name in extern "C"
declaration.

Names starting with an underscore are reserved at the global scope, so
cannot be used as the name of an extern "C" symbol in any scope because
such usages conflict with a name at global scope.
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/include/clang/Basic/IdentifierTable.h
clang/lib/AST/Decl.cpp
clang/test/SemaCXX/reserved-identifier.cpp