[PATCH] D50532: Fix a wrong type bug in ParsedAttr::TypeTagForDatatypeData

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 10 04:21:00 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rC339423: Fix a wrong type bug in ParsedAttr::TypeTagForDatatypeData (authored by brunoricci, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D50532?vs=159988&id=160086#toc

Repository:
  rC Clang

https://reviews.llvm.org/D50532

Files:
  include/clang/Sema/ParsedAttr.h


Index: include/clang/Sema/ParsedAttr.h
===================================================================
--- include/clang/Sema/ParsedAttr.h
+++ include/clang/Sema/ParsedAttr.h
@@ -78,7 +78,7 @@
 };
 
 struct TypeTagForDatatypeData {
-  ParsedType *MatchingCType;
+  ParsedType MatchingCType;
   unsigned LayoutCompatible : 1;
   unsigned MustBeNull : 1;
 };
@@ -502,7 +502,7 @@
   const ParsedType &getMatchingCType() const {
     assert(getKind() == AT_TypeTagForDatatype &&
            "Not a type_tag_for_datatype attribute");
-    return *getTypeTagForDatatypeDataSlot().MatchingCType;
+    return getTypeTagForDatatypeDataSlot().MatchingCType;
   }
 
   bool getLayoutCompatible() const {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50532.160086.patch
Type: text/x-patch
Size: 697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180810/18dac497/attachment.bin>


More information about the cfe-commits mailing list