[clang] [Clang][Sema] Fix crash when diagnosing near-match for 'constexpr' redeclaration in C++11 (PR #92452)

Krystian Stasiowski via cfe-commits cfe-commits at lists.llvm.org
Fri May 17 05:49:37 PDT 2024


================
@@ -1527,20 +1527,20 @@ struct DeclaratorChunk {
 
     /// Retrieve the location of the 'const' qualifier.
     SourceLocation getConstQualifierLoc() const {
-      assert(MethodQualifiers);
-      return MethodQualifiers->getConstSpecLoc();
+      return MethodQualifiers ? MethodQualifiers->getConstSpecLoc()
----------------
sdkrystian wrote:

@AaronBallman Updated

https://github.com/llvm/llvm-project/pull/92452


More information about the cfe-commits mailing list