================
@@ -1212,6 +1212,16 @@ class VarDecl : public DeclaratorDecl, public 
Redeclarable<VarDecl> {
       && !isFileVarDecl();
   }
 
+  /// Returns true if a variable is a static file-scope variable.
+  bool isStaticFileVar() const {
+    return isFileVarDecl() && getStorageClass() == SC_Static;
+  }
+
+  /// Returns true if this is a file-scope variable with internal linkage.
+  bool hasInternalLinkageFileVar() const {
+    return isFileVarDecl() && !isExternallyVisible() && !isStaticDataMember();
----------------
zwuis wrote:

Does `isExternallyVisible()` handle static data members expectedly? If yes, 
could you please try to resolve the TODO comment in this PR now?

https://github.com/llvm/llvm-project/pull/178342
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to