================
@@ -803,17 +803,26 @@ void
StoreDiags::HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
}
// Otherwise, follow clang's behavior: no fixits in macros.
if (FixIt.RemoveRange.getBegin().isMacroID() ||
- FixIt.RemoveRange.getEnd().isMacroID())
+ FixIt.RemoveRange.getEnd().isMacroID() ||
+ !isInsideMainFile(FixIt.RemoveRange.getBegin(), SM))
return false;
+ }
+ llvm::SmallVector<FixItHint, 4> MergedFixIts;
----------------
zeyi2 wrote:
Is there any specific reason we need 4 here?
In https://llvm.org/doxygen/classllvm_1_1SmallVector.html#details:
> In the absence of a well-motivated choice for the number of inlined elements
> N, it is recommended to use SmallVector<T> (that is, omitting the N).
https://github.com/llvm/llvm-project/pull/208682
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits