[PATCH] D23585: [ASTMatchers] Add narrowing matcher: hasExternalFormalLinkage

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 17 05:30:13 PDT 2016


aaron.ballman added inline comments.

================
Comment at: include/clang/ASTMatchers/ASTMatchers.h:5490-5497
@@ +5489,10 @@
+///
+/// From clang/Basic/Linkage.h:
+/// > UniqueExternalLinkage:
+/// > External linkage within a unique namespace.
+/// > From the language perspective, these entities have external
+/// > linkage. However, since they reside in an anonymous namespace,
+/// > their names are unique to this translation unit, which is
+/// > equivalent to having internal linkage from the code-generation
+/// > point of view.
+///
----------------
I wouldn't copy and paste the text from Linkage.h, merely point out below: `Example matches f() because it has external formal linkage despite being unique to the translation unit as though it has internal linkage (matcher = ...)`.


https://reviews.llvm.org/D23585





More information about the cfe-commits mailing list