[PATCH] D57464: Generalize method overloading on addr spaces to C++
Bevin Hansson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 30 15:21:36 PST 2019
ebevhan added inline comments.
================
Comment at: lib/Parse/ParseDeclCXX.cpp:2309
+ attr.getScopeName(), attr.getScopeLoc(), &AU,
+ attr.getNumArgs(), ParsedAttr::AS_GNU);
+ attr.setInvalid();
----------------
Are we interested in preserving the spelling?
================
Comment at: lib/Parse/ParseDeclCXX.cpp:2313
+ }
+ }
----------------
Is there a reason that the attributes are parsed here and not in `ParseFunctionDeclarator` like the rest of the ref-qualifiers (and the OpenCL++ ASes)?
That is possibly why the parser is getting confused with the trailing return.
================
Comment at: lib/Sema/SemaType.cpp:4883
+ return AS;
+ }};
+ LangAS AS = LangAS::Default;
----------------
This lambda is a bit unwieldy, it would probably be better as a separate function.
================
Comment at: lib/Sema/SemaType.cpp:5865
+/// value and argument expression will be filled in. Returns value indicating
+/// whether any diagnostic occurred.
+static bool ProcessAddressSpaceAttribute(Sema &S, const ParsedAttr &Attr,
----------------
"Returns value" could be more specific. "Returns true if the attribute was processed successfully."
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57464/new/
https://reviews.llvm.org/D57464
More information about the cfe-commits
mailing list