[PATCH] D146148: Float_t and double_t types shouldn't be modified by #pragma clang fp eval_method

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 16 15:01:20 PDT 2023


rjmccall added inline comments.


================
Comment at: clang/include/clang/Basic/IdentifierTable.h:341
+  void setInterestingIdentifierID(unsigned ID) {
+    assert(ID != FirstBuiltinID);
+    ObjCOrBuiltinID = FirstInterestingIdentifierID + (ID - 1);
----------------
Similarly, this assertion needs to be `!= tok::not_interesting` (i.e. `!= 0`).


================
Comment at: clang/include/clang/Basic/IdentifierTable.h:326
+    ObjCOrBuiltinID = FirstBuiltinID + (ID - 1);
+    assert(getBuiltinID() == ID && "ID too large for field!");
+  }
----------------
zahiraam wrote:
> Is this the assert you are looking for?
No, I want you to assert that `ID` (the argument) is not 0, because if it is you'll end up setting `ObjCOrBuiltinID` to `FirstBuiltinID - 1`, i.e. `LastInterestingIdentifierID`.


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

https://reviews.llvm.org/D146148



More information about the cfe-commits mailing list