File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -96,9 +96,14 @@ AST_MATCHER(QualType, isIntegralType) {
9696
9797AST_MATCHER_P (UserDefinedLiteral, hasLiteral,
9898 clang::ast_matchers::internal::Matcher<Expr>, InnerMatcher) {
99- if (const Expr *CookedLiteral = Node.getCookedLiteral ()) {
99+ const UserDefinedLiteral::LiteralOperatorKind LOK =
100+ Node.getLiteralOperatorKind ();
101+ if (LOK == UserDefinedLiteral::LOK_Template ||
102+ LOK == UserDefinedLiteral::LOK_Raw)
103+ return false ;
104+
105+ if (const Expr *CookedLiteral = Node.getCookedLiteral ())
100106 return InnerMatcher.matches (*CookedLiteral, Finder, Builder);
101- }
102107 return false ;
103108}
104109
Original file line number Diff line number Diff line change @@ -376,6 +376,7 @@ Changes in existing checks
376376- Improved :doc: `readability-container-size-empty
377377 <clang-tidy/checks/readability/container-size-empty>` check to prevent false
378378 positives when utilizing ``size `` or ``length `` methods that accept parameter.
379+ Fixed crash when facing template user defined literals.
379380
380381- Improved :doc: `readability-duplicate-include
381382 <clang-tidy/checks/readability/duplicate-include>` check by excluding include
Original file line number Diff line number Diff line change @@ -889,3 +889,9 @@ namespace PR88203 {
889889 // CHECK-FIXES: {{^ }}if (s.empty()) {}{{$}}
890890 }
891891}
892+
893+ namespace PR94454 {
894+ template <char ...>
895+ int operator " " _ci() { return 0 ; }
896+ auto eq = 0_ci == 0 ;
897+ }
You can’t perform that action at this time.
0 commit comments