]> granicus.if.org Git - clang/commit
Don't consider records with a NULL identifier as a name for typo correction.
authorKaelyn Uhrain <rikka@google.com>
Wed, 5 Feb 2014 18:57:51 +0000 (18:57 +0000)
committerKaelyn Uhrain <rikka@google.com>
Wed, 5 Feb 2014 18:57:51 +0000 (18:57 +0000)
commitc1b19f171d833880559d0f15ea27895452f4df09
treeb7ea4e589813fb76912c8780bb5d2727c7ff1ddc
parenta7b48ed6e362947101b732f840405b784bf185e0
Don't consider records with a NULL identifier as a name for typo correction.

Because in C++, "anonymous" doesn't mean "nameless" for records. In
other words, RecordDecl::isAnonymousStructOrUnion only returns true if
the record lacks a name *and* is not used as the type in an object's
declaration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200868 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaLookup.cpp
test/SemaCXX/typo-correction-pt2.cpp