]> granicus.if.org Git - clang/commit
AST: Ensure implicit records have default visibility
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 15 Jan 2015 08:41:25 +0000 (08:41 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 15 Jan 2015 08:41:25 +0000 (08:41 +0000)
commit1410004f9e314b128c9450b65b39f83a8b7a61dd
treed9d1f7c41d381f8ea186a4da3686c6fe0ce44186
parent07e4ab6d5a04c64b74eb9ac20d61834a2617d042
AST: Ensure implicit records have default visibility

Types composed with certain implicit record types would have their RTTI
marked as hidden because the implicit record type didn't have any
visibility.

This manifests itself as triggering false positives from tools like
clang's -fsantize=function feature.  The RTTI for a function type's
return type wouldn't match if the return type was an implicit record
type.

Patch by Stephan Bergmann!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226148 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ASTContext.cpp
test/CodeGenCXX/implicit-record-visibility.cpp [new file with mode: 0644]