[PATCH] D55534: [AST] Store "UsesADL" information in CallExpr.
Matt Kulukundis via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 10 21:59:12 PST 2018
fowles added inline comments.
================
Comment at: include/clang/AST/ExprCXX.h:218
+ SourceLocation RP, unsigned MinNumArgs = 0,
+ bool UsesADL = false)
: CallExpr(C, CUDAKernelCallExprClass, fn, Config, args, t, VK, RP,
----------------
Can CUDAKernelCalls ever use ADL?
================
Comment at: include/clang/AST/ExprCXX.h:499
+ : CallExpr(C, UserDefinedLiteralClass, Fn, Args, T, VK, LitEndLoc,
+ /*MinNumArgs=*/0, /*UsesADL=*/false),
UDSuffixLoc(SuffixLoc) {}
----------------
Same question, I assume user defined literals can only be called as string suffixes and thus never get ADL
================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:1275
+/// NS::y(x); // Doesn't match
+/// y(42);
+/// }
----------------
y(42); // Doesn't match
================
Comment at: include/clang/Sema/Overload.h:775
+ /// True if the candidate was found using ADL.
+ bool IsADLCandidate;
+
----------------
maybe bit pack these? I think overload sets for operator<< actually get pretty big
================
Comment at: lib/Sema/SemaOverload.cpp:8946
+ ExplicitTemplateArgs, Args, CandidateSet,
+ /*SuppressUserConversions=*/false,
+ PartialOverloading, /*IsADLCandidate=*/true);
----------------
should this fix be in a separate change?
================
Comment at: lib/Sema/SemaOverload.cpp:12024
return SemaRef.BuildResolvedCallExpr(Fn, FDecl, LParenLoc, Args, RParenLoc,
- ExecConfig);
+ ExecConfig, /*IsExecConfig*/ false,
+ (*Best)->IsADLCandidate);
----------------
/*IsExecConfig=*/
================
Comment at: lib/Sema/SemaOverload.cpp:12077
return SemaRef.BuildResolvedCallExpr(Fn, FDecl, LParenLoc, Args, RParenLoc,
- ExecConfig);
+ ExecConfig, /*IsExecConfig*/ false,
+ (*Best)->IsADLCandidate);
----------------
here too
================
Comment at: lib/Serialization/ASTReaderStmt.cpp:735
unsigned NumArgs = Record.readInt();
+ bool UsesADL = Record.readInt();
assert((NumArgs == E->getNumArgs()) && "Wrong NumArgs!");
----------------
readInt into a bool?
================
Comment at: unittests/ASTMatchers/ASTMatchersNodeTest.cpp:204
+ StatementMatcher ADLMatch = callExpr(usesADL());
+ auto NS_Str = R"DELIM(
+ namespace NS {
----------------
if you use cc or cpp as your delimiter, I think clang-format will recurse correctly
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55534/new/
https://reviews.llvm.org/D55534
More information about the cfe-commits
mailing list