[PATCH] D15524: [GCC] Attribute ifunc support in clang
John McCall via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 29 11:41:37 PST 2015
rjmccall added a comment.
This looks great, thanks. A few minor comment tweaks and this will be ready to commit.
================
Comment at: include/clang/AST/DeclBase.h:562
@@ -561,1 +561,3 @@
+ /// \brief Return true if this declaration is a definition of alias or ifunc.
+ bool hasDefiningAttr() const;
----------------
"Return true if this declaration has an attribute which acts as a definition of the entity, such as 'alias' or 'ifunc'."
================
Comment at: include/clang/AST/DeclBase.h:565
@@ +564,3 @@
+
+ /// \brief Returns AliasAttr or IFuncAttr if any or nullptr.
+ Attr* getDefiningAttr() const;
----------------
"Return this declaration's defining attribute if it has one."
Also, please put the * next to the method name rather than the type.
================
Comment at: include/clang/Basic/AttrDocs.td:1868
@@ +1867,3 @@
+
+The symbol name of the resolver function is given in quotes. A function with this name (after mangling) must be defined in the current translation unit; it may be ``static``. The resolver function should take no arguments and return a function pointer.
+
----------------
Okay, this should just say "...and return a pointer", since that's all we're enforcing.
================
Comment at: lib/Sema/SemaDecl.cpp:2316
@@ -2315,3 +2315,3 @@
? diag::err_alias_after_tentative
: diag::err_redefinition;
S.Diag(VD->getLocation(), Diag) << VD->getDeclName();
----------------
Oh, of course, makes sense.
http://reviews.llvm.org/D15524
More information about the cfe-commits
mailing list