@@ -0,0 +1,92 @@
+
+Warning suppression mappings
+
+
+.. contents::
+ :local:
+
+Introduction
+
+
+Warning suppression mappings enables users to suppress clang's diagnostics in a
+per-file granular manner. Enabl
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor
Flavor,
setSeverity(Diag, Map, Loc);
}
+namespace {
+class WarningsSpecialCaseList : public llvm::SpecialCaseList {
+public:
+ static std::unique_ptr
+ create(const llvm::MemoryBuffer &MB, st
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor
Flavor,
setSeverity(Diag, Map, Loc);
}
+namespace {
+class WarningsSpecialCaseList : public llvm::SpecialCaseList {
kadircet wrote:
because we don't have any visibility restri
@@ -1315,6 +1319,29 @@ with its corresponding `Wno-` option.
Note that when combined with :option:`-w` (which disables all warnings),
disabling all warnings wins.
+.. _warning_suppression_mappings:
+
+Controlling Diagnostics via Suppression Mappings
+^^
https://github.com/kadircet requested changes to this pull request.
thanks I think this LG in terms of module-builder interfaces, but I think we
can make some more changes to implementation to ensure it's easier to maintain
going forward.
speaking of maintenance, @HighCommander4 is definitely
@@ -316,36 +287,169 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
https://github.com/kadircet edited
https://github.com/llvm/llvm-project/pull/106683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -316,36 +287,169 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
@@ -316,36 +287,169 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
@@ -482,6 +482,42 @@ void func() {
EXPECT_EQ(Result.signatures[0].parameters[0].labelString, "int a");
}
+TEST_F(PrerequisiteModulesTests, ReusablePrerequisiteModulesTest) {
kadircet wrote:
can you also add some tests demonstrating behavior in presence of s
@@ -228,54 +223,30 @@ class StandalonePrerequisiteModules : public
PrerequisiteModules {
return BuiltModuleNames.contains(ModuleName);
}
- void addModuleFile(llvm::StringRef ModuleName,
- llvm::StringRef ModuleFilePath) {
-RequiredModules.emplac
@@ -228,54 +223,30 @@ class StandalonePrerequisiteModules : public
PrerequisiteModules {
return BuiltModuleNames.contains(ModuleName);
}
- void addModuleFile(llvm::StringRef ModuleName,
- llvm::StringRef ModuleFilePath) {
-RequiredModules.emplac
https://github.com/kadircet requested changes to this pull request.
(need to write something here apparently)
https://github.com/llvm/llvm-project/pull/113879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
kadircet wrote:
> So I prefer ASTUnit here especially clangd already depends on clangFrontend
> already so I feel like I didn't introduce a new dependency.
It isn't at all about having this dependency in terms of "build graph", but
rather about mental complexity and maintenance burden of that.
@@ -946,6 +953,24 @@ class DiagnosticsEngine : public
RefCountedBase {
return (Level)Diags->getDiagnosticLevel(DiagID, Loc, *this);
}
+ /// Diagnostic suppression mappings can be used to ignore diagnostics based
on
+ /// the file they occur in. Mapping file is expect
@@ -127,33 +127,39 @@ struct ModuleFile {
std::string ModuleFilePath;
};
-bool IsModuleFileUpToDate(PathRef ModuleFilePath,
- const PrerequisiteModules &RequisiteModules,
- llvm::IntrusiveRefCntPtr VFS)
{
+bool IsModuleFileU
https://github.com/kadircet requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/113879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -127,33 +127,39 @@ struct ModuleFile {
std::string ModuleFilePath;
};
-bool IsModuleFileUpToDate(PathRef ModuleFilePath,
- const PrerequisiteModules &RequisiteModules,
- llvm::IntrusiveRefCntPtr VFS)
{
+bool IsModuleFileU
@@ -8979,3 +8979,8 @@ def wasm_opt : Flag<["--"], "wasm-opt">,
Group,
HelpText<"Enable the wasm-opt optimizer (default)">,
MarshallingInfoNegativeFlag>;
+
+def warning_suppression_mappings_EQ : Joined<["--"],
+ "warning-suppression-mappings=">, Group,
+ HelpText<"File c
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor
Flavor,
setSeverity(Diag, Map, Loc);
}
+namespace {
+class WarningsSpecialCaseList : public llvm::SpecialCaseList {
kadircet wrote:
unfortunately we need to use inheritance, a
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor
Flavor,
setSeverity(Diag, Map, Loc);
}
+namespace {
+class WarningsSpecialCaseList : public llvm::SpecialCaseList {
+public:
+ static std::unique_ptr
+ create(const llvm::MemoryBuffer &MB, st
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor
Flavor,
setSeverity(Diag, Map, Loc);
}
+namespace {
+class WarningsSpecialCaseList : public llvm::SpecialCaseList {
+public:
+ static std::unique_ptr
+ create(const llvm::MemoryBuffer &MB, st
@@ -127,50 +128,64 @@ struct ModuleFile {
std::string ModuleFilePath;
};
-bool IsModuleFileUpToDate(
-PathRef ModuleFilePath,
-const PrerequisiteModules &RequisiteModules) {
-IntrusiveRefCntPtr Diags =
- CompilerInstance::createDiagnostics(new DiagnosticOptions(
@@ -85,19 +85,20 @@ class PrerequisiteModules {
/// different versions and different source files.
class ModulesBuilder {
public:
- ModulesBuilder(const GlobalCompilationDatabase &CDB) : CDB(CDB) {}
+ ModulesBuilder() = default;
+ virtual ~ModulesBuilder() = default;
Mo
https://github.com/kadircet commented:
thanks for the review @bricknerb, this is ready for next round
https://github.com/llvm/llvm-project/pull/112517
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
@@ -85,19 +85,20 @@ class PrerequisiteModules {
/// different versions and different source files.
class ModulesBuilder {
kadircet wrote:
> I was told we don't like forward declaration in clangd
Yes in theory this is also a forward declaration, but it's not in
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor
Flavor,
setSeverity(Diag, Map, Loc);
}
+namespace {
+class WarningsSpecialCaseList : public llvm::SpecialCaseList {
+public:
+ static std::unique_ptr
+ create(const llvm::MemoryBuffer &MB, st
@@ -338,17 +460,129 @@ ModulesBuilder::buildPrerequisiteModulesFor(PathRef File,
return std::move(RequiredModules);
}
-bool StandalonePrerequisiteModules::canReuse(
+ReusableModulesBuilder::ModuleBuildingSharedOwner
+ReusableModulesBuilder::getOrCreateModuleBuildingOwner(Str
@@ -477,6 +485,100 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor
Flavor,
setSeverity(Diag, Map, Loc);
}
+namespace {
+class WarningsSpecialCaseList : public llvm::SpecialCaseList {
kadircet wrote:
i'd rather keep it here as I actually want
https://github.com/kadircet updated
https://github.com/llvm/llvm-project/pull/112517
From c0d2e4590308ebaaee78d7fe130a72b8586f6a88 Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Mon, 14 Oct 2024 11:20:55 +0200
Subject: [PATCH 1/4] [clang] Introduce diagnostics suppression mappings
This i
kadircet wrote:
> clang/docs/ReleaseNotes.rst?
I was planning to add docs in a follow up once the UX is more mature, but I
guess it doesn't hurt to do that here as well.
https://github.com/llvm/llvm-project/pull/112517
___
cfe-commits mailing list
cf
@@ -127,33 +127,39 @@ struct ModuleFile {
std::string ModuleFilePath;
};
-bool IsModuleFileUpToDate(PathRef ModuleFilePath,
- const PrerequisiteModules &RequisiteModules,
- llvm::IntrusiveRefCntPtr VFS)
{
+bool IsModuleFileU
https://github.com/kadircet requested changes to this pull request.
thanks!
https://github.com/llvm/llvm-project/pull/113879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet edited
https://github.com/llvm/llvm-project/pull/113879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -127,50 +128,64 @@ struct ModuleFile {
std::string ModuleFilePath;
};
-bool IsModuleFileUpToDate(
-PathRef ModuleFilePath,
-const PrerequisiteModules &RequisiteModules) {
-IntrusiveRefCntPtr Diags =
- CompilerInstance::createDiagnostics(new DiagnosticOptions(
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
https://github.com/kadircet requested changes to this pull request.
thanks, i think this looks great!
some little comments/nits.
https://github.com/llvm/llvm-project/pull/106683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
https://github.com/kadircet edited
https://github.com/llvm/llvm-project/pull/106683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
https://github.com/kadircet approved this pull request.
thanks a lot for bearing with me! LGTM, let's ship it!
https://github.com/llvm/llvm-project/pull/106683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailm
@@ -23,10 +23,15 @@
// simpler because a remark can't be promoted to an error.
#include "clang/Basic/AllDiagnostics.h"
#include "clang/Basic/Diagnostic.h"
+#include "clang/Basic/DiagnosticDriver.h"
+#include "clang/Basic/DiagnosticIDs.h"
#include "clang/Basic/DiagnosticOptions
@@ -1315,6 +1319,34 @@ with its corresponding `Wno-` option.
Note that when combined with :option:`-w` (which disables all warnings),
disabling all warnings wins.
+.. _warning_suppression_mappings:
+
+Controlling Diagnostics via Suppression Mappings
+^^
@@ -9017,3 +9017,8 @@ def wasm_opt : Flag<["--"], "wasm-opt">,
Group,
HelpText<"Enable the wasm-opt optimizer (default)">,
MarshallingInfoNegativeFlag>;
+
+def warning_suppression_mappings_EQ : Joined<["--"],
kadircet wrote:
> This should move elsewhere
@@ -1315,6 +1319,34 @@ with its corresponding `Wno-` option.
Note that when combined with :option:`-w` (which disables all warnings),
disabling all warnings wins.
+.. _warning_suppression_mappings:
+
+Controlling Diagnostics via Suppression Mappings
+^^
https://github.com/kadircet edited
https://github.com/llvm/llvm-project/pull/112517
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -477,6 +486,136 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor
Flavor,
setSeverity(Diag, Map, Loc);
}
+namespace {
+// FIXME: We should isolate the parser from SpecialCaseList and just use it
+// here.
+class WarningsSpecialCaseList : public llvm::SpecialC
kadircet wrote:
@AaronBallman merging this to main now. PLMK if you have any concerns, I am
happy to address them post-submit (or revert if need be)
https://github.com/llvm/llvm-project/pull/112517
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
https://github.com/kadircet updated
https://github.com/llvm/llvm-project/pull/115852
From a999e3081d16170d510ab74222564fbcb4c6a7c2 Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Tue, 12 Nov 2024 12:09:29 +0100
Subject: [PATCH 1/2] [NFC] Explicitly pass a VFS when creating
DiagnosticsEngi
kadircet wrote:
so
https://github.com/llvm/llvm-project/commit/12e3ed8de8c6063b15916b3faf67c8c9cd17df1f
should resolve both lldb buildbot breakage and compile time regression in
clang.
that being said, I don't think
https://github.com/llvm/llvm-project/commit/12e3ed8de8c6063b15916b3faf67c8c9
kadircet wrote:
> FYI, looks like this is causing following LLDB tests to fail:
> https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/15106/execution/node/97/log/
>
> ```
> Unresolved Tests (17):
> lldb-api ::
> commands/expression/import-std-module/array/TestArrayFromStdModu
https://github.com/kadircet created
https://github.com/llvm/llvm-project/pull/115852
Starting with 41e3919ded78d8870f7c95e9181c7f7e29aa3cc4 DiagnosticsEngine
creation might perform IO. It was implicitly defaulting to
getRealFileSystem. This patch makes it explicit by pushing the decision
making
https://github.com/kadircet closed
https://github.com/llvm/llvm-project/pull/112517
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
kadircet wrote:
i think limiting this to `RealFileSystem::openFileForRead` LG, but can we make
sure `IsText` defaults to `false` and we can only set it in `#ifdef __MVS__`
block to make sure this is really a no-op for other platforms. e.g.:
```cppp
auto OpenFlags = sys::fs::OF_None;
#ifdef __MV
https://github.com/kadircet created
https://github.com/llvm/llvm-project/pull/110091
This used to filter any names with `_` in them, apart from
enum-constants. Resulting in discrepancies in behavior when we had
fields that have `_` in the name, or for accessors like `set_`, `has_`.
The logic se
kadircet wrote:
https://reviews.llvm.org/D46751 for context from the original patch
https://github.com/llvm/llvm-project/pull/110091
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -489,13 +485,7 @@ static DiagnosticIDs::Level toLevel(diag::Severity SV) {
DiagnosticIDs::Level
DiagnosticIDs::getDiagnosticLevel(unsigned DiagID, SourceLocation Loc,
const DiagnosticsEngine &Diag) const {
- // Handle custom diagnostics, wh
@@ -489,13 +485,7 @@ static DiagnosticIDs::Level toLevel(diag::Severity SV) {
DiagnosticIDs::Level
DiagnosticIDs::getDiagnosticLevel(unsigned DiagID, SourceLocation Loc,
const DiagnosticsEngine &Diag) const {
- // Handle custom diagnostics, wh
@@ -243,14 +244,16 @@ class AnnotatingParser {
// operator that was misinterpreted because we are parsing template
// parameters.
// FIXME: This is getting out of hand, write a decent parser.
- if (InExpr && !Line.startsWith(tok::kw_template) &&
+ if
@@ -402,6 +402,46 @@ import A;
EXPECT_TRUE(D.isFromASTFile());
}
+// An end to end test for code complete in modules
+TEST_F(PrerequisiteModulesTests, CodeCompleteTest) {
kadircet wrote:
can you also add a test for signature help?
https://github.com/llvm/l
https://github.com/kadircet updated
https://github.com/llvm/llvm-project/pull/110091
From 08e2a37c8b028efcacd5ee8a269aed837ba16698 Mon Sep 17 00:00:00 2001
From: Kadir Cetinkaya
Date: Thu, 26 Sep 2024 10:55:49 +0200
Subject: [PATCH] [clangd] Improve filtering logic for undesired proto symbols
https://github.com/kadircet edited
https://github.com/llvm/llvm-project/pull/110083
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet requested changes to this pull request.
thanks, mostly LG!
https://github.com/llvm/llvm-project/pull/110083
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2108,7 +2116,7 @@ class CodeCompleteFlow {
} // namespace
-clang::CodeCompleteOptions CodeCompleteOptions::getClangCompleteOpts() const {
+clang::CodeCompleteOptions CodeCompleteOptions::getClangCompleteOpts(bool
ForceLoadExternal) const {
kadircet wrote
@@ -2108,7 +2116,7 @@ class CodeCompleteFlow {
} // namespace
-clang::CodeCompleteOptions CodeCompleteOptions::getClangCompleteOpts() const {
+clang::CodeCompleteOptions CodeCompleteOptions::getClangCompleteOpts(bool
ForceLoadExternal) const {
kadircet wrote
https://github.com/kadircet edited
https://github.com/llvm/llvm-project/pull/109795
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1802,32 +1802,32 @@ enum class ArraySizeModifier;
enum class ElaboratedTypeKeyword;
enum class VectorKind;
-/// The base class of the type hierarchy.
+/// A type in the program, such as `int` or `vector`.
+/// This the base class for a hierarchy: PointerType, BuiltinType e
@@ -79,8 +79,24 @@ enum class StringLiteralKind;
// AST classes for statements.
//===--===//
-/// Stmt - This represents one statement.
+/// A statement or expression in the program.
///
+/// This is the bas
https://github.com/kadircet approved this pull request.
thanks a lot for doing this!
https://github.com/llvm/llvm-project/pull/109795
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet created
https://github.com/llvm/llvm-project/pull/110272
Currently callers of analyze can't get detailed information about a missing
header, e.g. resolve path. Only way to get at this is to use low level walkUsed
funciton, which is way more complicated than just cal
https://github.com/kadircet approved this pull request.
thanks!
https://github.com/llvm/llvm-project/pull/109421
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet edited
https://github.com/llvm/llvm-project/pull/107906
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
kadircet wrote:
i've also just noticed
https://github.com/llvm/llvm-project/commit/3b3accb598ec87a6a30b0e18ded06071030bb78f,
which seem to be pushed without review and any tests, changing behavior more
in a non-obvious way. Please not that logic you have in:
```
Expected FDOrErr = sys::fs::o
@@ -323,10 +325,11 @@ ErrorOr RealFileSystem::status(const Twine &Path)
{
}
ErrorOr>
-RealFileSystem::openFileForRead(const Twine &Name) {
+RealFileSystem::openFileForRead(const Twine &Name, bool IsText) {
SmallString<256> RealName, Storage;
Expected FDOrErr = sys::fs::
@@ -121,8 +121,18 @@ ContentCache::getBufferOrNone(DiagnosticsEngine &Diag,
FileManager &FM,
// Start with the assumption that the buffer is invalid to simplify early
// return paths.
IsBufferInvalid = true;
-
- auto BufferOrError = FM.getBufferForFile(*ContentsEntry, I
https://github.com/kadircet commented:
hi sorry for missing this during the review time, i believe this change is
changing some of the core support library interfaces in a way that's not
justified.
this is an interface implemented by quite a lot of both upstream and downstream
clients, but th
kadircet wrote:
thanks a lot for the swift response!
I can see how none of these implementations are not using those flags _today_,
but we're changing the observable behavior for them as well, and if some of
those implementations decides to give meaning to these flags, it might be
impossible
https://github.com/kadircet closed
https://github.com/llvm/llvm-project/pull/110091
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kadircet requested changes to this pull request.
sorry this is same as https://github.com/llvm/llvm-project/pull/107906 (with a
bigger impact radius, as you're also changing getBufferForFile) and doesn't
address any of the issues mention about explaining the semantics of `IsT
https://github.com/kadircet created
https://github.com/llvm/llvm-project/pull/109099
This patch disables all clang warnings when running include-cleaner, as
users aren't interested in other findings and in-development code might
have them temporarily. This ensures tool can keep working even in
p
https://github.com/kadircet closed
https://github.com/llvm/llvm-project/pull/109099
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
kadircet wrote:
thanks a lot for taking care of this @AaronBallman, I think the only concern
here is not regressing clangd functionality. We can figure out how we should
trim down the bits that're moving into clangd later if need be. I think this
LG, but cc @hokein as well.
https://github.co
@@ -243,14 +244,16 @@ class AnnotatingParser {
// operator that was misinterpreted because we are parsing template
// parameters.
// FIXME: This is getting out of hand, write a decent parser.
- if (InExpr && !Line.startsWith(tok::kw_template) &&
+ if
@@ -0,0 +1,90 @@
+
+Warning suppression mappings
+
+
+.. contents::
+ :local:
+
+Introduction
+
+
+Warning suppression mappings enable users to suppress Clang's diagnostics in a
+per-file granular manner. Enabli
https://github.com/kadircet commented:
> Note that there are a few open comments from previous iterations.
I tried to go over them, but github UI was ... suboptimal. So PLMK if you got
some that aren't addressed in this revision as well.
https://github.com/llvm/llvm-project/pull/112517
___
@@ -167,4 +176,159 @@ TEST(DiagnosticTest, storedDiagEmptyWarning) {
// Make sure an empty warning can round-trip with \c StoredDiagnostic.
Diags.Report(CaptureConsumer.StoredDiags.front());
}
+
+class SuppressionMappingTest : public testing::Test {
+public:
+ SuppressionM
@@ -0,0 +1,90 @@
+
+Warning suppression mappings
+
+
+.. contents::
+ :local:
+
+Introduction
+
+
+Warning suppression mappings enable users to suppress Clang's diagnostics in a
+per-file granular manner. Enabli
https://github.com/kadircet edited
https://github.com/llvm/llvm-project/pull/112517
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -477,6 +486,136 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor
Flavor,
setSeverity(Diag, Map, Loc);
}
+namespace {
+// FIXME: We should isolate the parser from SpecialCaseList and just use it
+// here.
+class WarningsSpecialCaseList : public llvm::SpecialC
@@ -701,11 +702,10 @@ class CompilerInstance : public ModuleLoader {
/// used by some diagnostics printers (for logging purposes only).
///
/// \return The new object on success, or null on failure.
- static IntrusiveRefCntPtr
- createDiagnostics(DiagnosticOptions *Opts
@@ -477,6 +486,109 @@ void DiagnosticsEngine::setSeverityForAll(diag::Flavor
Flavor,
setSeverity(Diag, Map, Loc);
}
+namespace {
+class WarningsSpecialCaseList : public llvm::SpecialCaseList {
+public:
+ static std::unique_ptr
+ create(const llvm::MemoryBuffer &MB, st
@@ -0,0 +1,90 @@
+
+Warning suppression mappings
+
+
+.. contents::
+ :local:
+
+Introduction
+
+
+Warning suppression mappings enable users to suppress Clang's diagnostics in a
+per-file granular manner. Enabli
@@ -167,4 +176,159 @@ TEST(DiagnosticTest, storedDiagEmptyWarning) {
// Make sure an empty warning can round-trip with \c StoredDiagnostic.
Diags.Report(CaptureConsumer.StoredDiags.front());
}
+
+class SuppressionMappingTest : public testing::Test {
+public:
+ SuppressionM
@@ -167,4 +176,159 @@ TEST(DiagnosticTest, storedDiagEmptyWarning) {
// Make sure an empty warning can round-trip with \c StoredDiagnostic.
Diags.Report(CaptureConsumer.StoredDiags.front());
}
+
+class SuppressionMappingTest : public testing::Test {
+public:
+ SuppressionM
@@ -0,0 +1,90 @@
+
+Warning suppression mappings
+
+
+.. contents::
+ :local:
+
+Introduction
+
+
+Warning suppression mappings enable users to suppress Clang's diagnostics in a
+per-file granular manner. Enabli
kadircet wrote:
sorry missed that, added docs to clang root tree
https://github.com/llvm/llvm-project/pull/112517
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
601 - 700 of 851 matches
Mail list logo