================
@@ -1900,12 +1900,10 @@ bool Sema::mightHaveNonExternalLinkage(const 
DeclaratorDecl *D) {
   return !D->isExternallyVisible();
 }
 
-// FIXME: This needs to be refactored; some other isInMainFile users want
-// these semantics.
-static bool isMainFileLoc(const Sema &S, SourceLocation Loc) {
-  if (S.TUKind != TU_Complete || S.getLangOpts().IsHeaderFile)
+bool Sema::isMainFileLoc(SourceLocation Loc) const {
----------------
zwuis wrote:

IMO this definition should be put in Sema.cpp because it can be used for other 
kinds of semantic analysis.

The declaration of `isMainFileLoc` might be moved because declarations in 
Sema.h are grouped by files where they are implemented.

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