[PATCH] D148696: [clang][Sema][NFC] Sprinkle some const around in Sema

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 20 00:31:45 PDT 2023


tbaeder marked 5 inline comments as done.
tbaeder added inline comments.


================
Comment at: clang/lib/Sema/SemaLookup.cpp:1337
       if (S->isClassScope())
-        if (CXXRecordDecl *Record =
-                dyn_cast_or_null<CXXRecordDecl>(S->getEntity()))
+        if (auto *Record = dyn_cast_if_present<CXXRecordDecl>(S->getEntity()))
           R.setNamingClass(Record);
----------------
aaron.ballman wrote:
> Right?
Unfortunately not, the naming class ends up in some `::Create` call at some point, so can't be const.


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

https://reviews.llvm.org/D148696



More information about the cfe-commits mailing list