]> granicus.if.org Git - clang/commitdiff
PR19691: initialize MacroDirective::DefInfo::IsPublic member in "invalid" state.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 30 Apr 2015 20:53:28 +0000 (20:53 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 30 Apr 2015 20:53:28 +0000 (20:53 +0000)
No functionality change; no-one inspects this field yet, and probably no-one
will ever inspect it in the "invalid" state, but ubsan could be unhappy about
this if such a DefInfo is copied.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236256 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Lex/MacroInfo.h

index c3a9472036bc31e1490b06eb613bf35563f7f8cb..7de995589b978b03cd88faa3d400b3526b819e22 100644 (file)
@@ -364,7 +364,7 @@ public:
     bool IsPublic;
 
   public:
-    DefInfo() : DefDirective(nullptr) { }
+    DefInfo() : DefDirective(nullptr), IsPublic(true) { }
 
     DefInfo(DefMacroDirective *DefDirective, SourceLocation UndefLoc,
             bool isPublic)