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.

llvm-svn: 236256

clang/include/clang/Lex/MacroInfo.h

index c3a9472..7de9955 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)