shivanshu3 marked an inline comment as done. shivanshu3 added inline comments.
================ Comment at: clang/lib/Parse/ParseExpr.cpp:2267-2280 + SourceLocation OpTokLoc = OpTok.getLocation(); + if (OpTokLoc.isMacroID()) { + SourceLocation OpTokExpansionLoc = + PP.getSourceManager().getFileLoc(OpTokLoc); + Diag(OpTokExpansionLoc, + diag::err_expected_parentheses_around_typename) + << OpTok.getName(); ---------------- rsmith wrote: > I don't think we should be assuming that `getLocForEndOfToken` will fail if > and only if the token is a macro -- that seems brittle. It would seem better > to check whether it actually failed and respond to that directly. Would > something like this suggestion work? Yup, I like that better, thank you for the suggestion! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91129/new/ https://reviews.llvm.org/D91129 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits