[PATCH] D133586: [clang] do not hash undefined qualifiers for FunctionNoProtoType

Richard Howell via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 9 10:12:44 PDT 2022


rmaz updated this revision to Diff 459108.
rmaz added a comment.

Move code to VisitFunctionProtoType instead of branch


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133586/new/

https://reviews.llvm.org/D133586

Files:
  clang/lib/AST/ODRHash.cpp


Index: clang/lib/AST/ODRHash.cpp
===================================================================
--- clang/lib/AST/ODRHash.cpp
+++ clang/lib/AST/ODRHash.cpp
@@ -889,9 +889,6 @@
   void VisitFunctionType(const FunctionType *T) {
     AddQualType(T->getReturnType());
     T->getExtInfo().Profile(ID);
-    Hash.AddBoolean(T->isConst());
-    Hash.AddBoolean(T->isVolatile());
-    Hash.AddBoolean(T->isRestrict());
     VisitType(T);
   }
 
@@ -904,6 +901,9 @@
     for (auto ParamType : T->getParamTypes())
       AddQualType(ParamType);
 
+    Hash.AddBoolean(T->isConst());
+    Hash.AddBoolean(T->isVolatile());
+    Hash.AddBoolean(T->isRestrict());
     VisitFunctionType(T);
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133586.459108.patch
Type: text/x-patch
Size: 692 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220909/7ba6db53/attachment.bin>


More information about the cfe-commits mailing list