[Lldb-commits] [PATCH] D138939: [WIP][clang] adds a way to provide user-oriented reasons

2023-04-20 Thread Christopher Di Bella via Phabricator via lldb-commits
cjdb abandoned this revision.
cjdb added a comment.
Herald added a subscriber: PiotrZSL.
Herald added a project: clang-format.
Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay.

Abandoning since we're heading down a different design path now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138939/new/

https://reviews.llvm.org/D138939

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D138939: [WIP][clang] adds a way to provide user-oriented reasons

2022-11-29 Thread Christopher Di Bella via Phabricator via lldb-commits
cjdb created this revision.
cjdb added reviewers: aaron.ballman, erichkeane, shafik.
Herald added subscribers: carlosgalvezp, kadircet, arphaman.
Herald added a reviewer: njames93.
Herald added projects: Flang, All.
cjdb requested review of this revision.
Herald added subscribers: cfe-commits, libcxx-commits, lldb-commits, jdoerfert.
Herald added projects: clang, LLDB, libc++abi, clang-tools-extra.
Herald added a reviewer: libc++abi.

Part of the [revised diagnostic model][1] is to provide users with
diagnostics that explain what's going wrong from their perspective,
as opposed to from the compiler's perspective. This may be achieved
through a rewording of the reason, or by provididng more info, or both.

This commit also changes the diagnostic for an explicit template
parameter gone wrong to demonstrate how it works.

NOTE: this is a work-in-progress. Most of the work has been fleshed out,
but the note needs to be provided with the kind of template argument it
is given. I'm looking into doing this, but it seems to require a lot of
tedious manual changes, and I'd prefer to get input on the changes that
are currently in the diff before making those extra changes (which will
distract from the current stuff, and may ultimately be unnecessary if
the current direction is undesirable).

[1]: https://discourse.llvm.org/t/rfc-improving-clang-s-diagnostics/62584


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138939

Files:
  clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
  clang-tools-extra/clangd/Compiler.cpp
  clang-tools-extra/clangd/Diagnostics.cpp
  clang/include/clang/Basic/Diagnostic.h
  clang/include/clang/Basic/Diagnostic.td
  clang/include/clang/Basic/DiagnosticAST.h
  clang/include/clang/Basic/DiagnosticAnalysis.h
  clang/include/clang/Basic/DiagnosticComment.h
  clang/include/clang/Basic/DiagnosticCrossTU.h
  clang/include/clang/Basic/DiagnosticDriver.h
  clang/include/clang/Basic/DiagnosticFrontend.h
  clang/include/clang/Basic/DiagnosticIDs.h
  clang/include/clang/Basic/DiagnosticLex.h
  clang/include/clang/Basic/DiagnosticParse.h
  clang/include/clang/Basic/DiagnosticRefactoring.h
  clang/include/clang/Basic/DiagnosticSema.h
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Basic/DiagnosticSerialization.h
  clang/include/clang/Basic/PartialDiagnostic.h
  clang/include/clang/Frontend/ASTUnit.h
  clang/include/clang/Frontend/DiagnosticRenderer.h
  clang/lib/Basic/Diagnostic.cpp
  clang/lib/Basic/DiagnosticIDs.cpp
  clang/lib/Format/TokenAnalyzer.cpp
  clang/lib/Frontend/ASTUnit.cpp
  clang/lib/Frontend/LogDiagnosticPrinter.cpp
  clang/lib/Frontend/SARIFDiagnosticPrinter.cpp
  clang/lib/Frontend/SerializedDiagnosticPrinter.cpp
  clang/lib/Frontend/TextDiagnosticBuffer.cpp
  clang/lib/Frontend/TextDiagnosticPrinter.cpp
  clang/lib/Sema/SemaOverload.cpp
  clang/test/Frontend/sarif-reason.cpp
  clang/test/TableGen/DiagnosticBase.inc
  clang/test/TableGen/deferred-diag.td
  clang/tools/clang-format/ClangFormat.cpp
  clang/tools/clang-import-test/clang-import-test.cpp
  clang/tools/diagtool/DiagnosticNames.cpp
  clang/unittests/Driver/SimpleDiagnosticConsumer.h
  clang/unittests/Driver/ToolChainTest.cpp
  clang/unittests/Frontend/FrontendActionTest.cpp
  clang/unittests/Tooling/RewriterTestContext.h
  clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
  flang/lib/Frontend/TextDiagnosticBuffer.cpp
  flang/lib/Frontend/TextDiagnosticPrinter.cpp
  libcxxabi/test/test_demangle.pass.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
  lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
===
--- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -697,7 +697,8 @@
 const clang::Diagnostic &info) override {
 if (m_log) {
   llvm::SmallVector diag_str(10);
-  info.FormatDiagnostic(diag_str);
+  info.FormatSummary(diag_str);
+  info.FormatLegacyReason(diag_str);
   diag_str.push_back('\0');
   LLDB_LOGF(m_log, "Compiler diagnostic: %s\n", diag_str.data());
 }
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
===
--- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -192,7 +192,8 @@
   Log *log = GetLog(LLDBLog::Expressions);
   if (log) {
 llvm::SmallVector diag_str;
-Info.FormatDiagnostic(diag_str);
+Info.FormatSummary(diag_str);
+Info.FormatLegacyReason(diag_str);
 diag_str.push_back('\0');
 const char *plain_diag = diag_str.data();
 LLDB_LOG(log, "Received diagnostic outside parsing: {0}", plain_diag);
Index: flang/lib/Frontend/TextDiagnost

[Lldb-commits] [PATCH] D138939: [WIP][clang] adds a way to provide user-oriented reasons

2022-11-29 Thread Christopher Di Bella via Phabricator via lldb-commits
cjdb added a comment.

I don't understand why `test_demangle.pass.cpp` was considered too big to 
upload. Here's the diff:

  diff --git a/libcxxabi/test/test_demangle.pass.cpp 
b/libcxxabi/test/test_demangle.pass.cpp
  index dce8e6c3..9da6fb7d2ad9 100644
  --- a/libcxxabi/test/test_demangle.pass.cpp
  +++ b/libcxxabi/test/test_demangle.pass.cpp
  @@ -11451,7 +11451,9 @@ const char* cases[][2] =
   {"_ZN5clang16DiagnosticClientD1Ev", 
"clang::DiagnosticClient::~DiagnosticClient()"},
   {"_ZN5clang16DiagnosticClientD2Ev", 
"clang::DiagnosticClient::~DiagnosticClient()"},
   
{"_ZN5clang16DiagnosticClient16HandleDiagnosticENS_10Diagnostic5LevelERKNS_14DiagnosticInfoE",
 "clang::DiagnosticClient::HandleDiagnostic(clang::Diagnostic::Level, 
clang::DiagnosticInfo const&)"},
  -
{"_ZNK5clang14DiagnosticInfo16FormatDiagnosticERN4llvm15SmallVectorImplIcEE", 
"clang::DiagnosticInfo::FormatDiagnostic(llvm::SmallVectorImpl&) const"},
  +
{"_ZNK5clang14DiagnosticInfo13FormatSummaryERN4llvm15SmallVectorImplIcEE", 
"clang::DiagnosticInfo::FormatSummary(llvm::SmallVectorImpl&) const"},
  +
{"_ZNK5clang14DiagnosticInfo18FormatLegacyReasonERN4llvm15SmallVectorImplIcEE", 
"clang::DiagnosticInfo::FormatLegacyReason(llvm::SmallVectorImpl&) 
const"},
  +
{"_ZNK5clang14DiagnosticInfo17FormatSARIFReasonERN4llvm15SmallVectorImplIcEE", 
"clang::DiagnosticInfo::FormatSARIFReason(llvm::SmallVectorImpl&) const"},
   
{"_ZNK5clang14DiagnosticInfo16FormatDiagnosticEPKcS2_RN4llvm15SmallVectorImplIcEE",
 "clang::DiagnosticInfo::FormatDiagnostic(char const*, char const*, 
llvm::SmallVectorImpl&) const"},
   {"_Z10ScanFormatPKcS0_c", "ScanFormat(char const*, char const*, char)"},
   
{"_Z20HandlePluralModifierRKN5clang14DiagnosticInfoEjPKcjRN4llvm15SmallVectorImplIcEE",
 "HandlePluralModifier(clang::DiagnosticInfo const&, unsigned int, char const*, 
unsigned int, llvm::SmallVectorImpl&)"},


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138939/new/

https://reviews.llvm.org/D138939

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D138939: [WIP][clang] adds a way to provide user-oriented reasons

2022-11-29 Thread Christopher Di Bella via Phabricator via lldb-commits
cjdb added a comment.

> The clang-side interface to this seems a touch clunky, and I fear it'll make 
> continuing its use/generalizing its use less likely.

Is this w.r.t. the `FormatDiagnostic` being split up, or is it something else? 
If it's the former: I'll be changing that to `FormatLegacyDiagnostic`, which 
//almost// gets us back to where we started.




Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:4520
+  DiagReason<
+/*Legacy:*/"invalid explicitly-specified argument for template parameter 
%0",
+/*SARIF:*/"we passed a %select{type|value|class template}1 as our 
%ordinal2 "

erichkeane wrote:
> Already kidna hate this format here.  Is there any way we could make this be 
> something more like:
> 
> `DiagReason, SARIF<"whatever">>` ?
I like this suggestion.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138939/new/

https://reviews.llvm.org/D138939

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D138939: [WIP][clang] adds a way to provide user-oriented reasons

2022-11-29 Thread Christopher Di Bella via Phabricator via lldb-commits
cjdb added a comment.

> though I find myself wondering if the "FormatDiagnostic" call should stay the 
> same, and choose the legacy-reason only when a sarif reason doesn't exist? Or 
> for some level of command line control?

Hmm... isn't this the point of the diagnostic consumers?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138939/new/

https://reviews.llvm.org/D138939

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D138939: [WIP][clang] adds a way to provide user-oriented reasons

2022-12-01 Thread Christopher Di Bella via Phabricator via lldb-commits
cjdb marked 3 inline comments as done.
cjdb added a comment.

In D138939#3963496 , @erichkeane 
wrote:

> In D138939#3963473 , @tschuett 
> wrote:
>
>> Maybe `void FormatDiagnostic(SmallVectorImpl &OutStr, DiagnosticMode 
>> mode)`instead of `void FormatDiagnostic(SmallVectorImpl &OutStr)`?
>> To make the transition easer and future proof.
>
> I like this idea.  Perhaps with DiagnosticMode being a 3-way enum:
>
>   enum struct DiagnosticMode {
> Legacy,
> Sarif,  
> Default = Legacy
>   }
>
> I like the idea in particular, since it makes a command line flag to modify 
> "Default" to be whichever the user prefers pretty trivial.

There's already a flag for this: `-fdiagnostics-format=sarif`. Why do we need a 
second diagnostic mode flag?




Comment at: clang/tools/clang-format/ClangFormat.cpp:397
+  Info.FormatSummary(vec);
+  Info.FormatLegacyReason(vec);
 errs() << "clang-format error:" << vec << "\n";

rymiel wrote:
> I don't think this indent change was intended?
I find it ironic that clang-format misformatted ClangFormat.cpp.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138939/new/

https://reviews.llvm.org/D138939

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D138939: [WIP][clang] adds a way to provide user-oriented reasons

2022-12-01 Thread Christopher Di Bella via Phabricator via lldb-commits
cjdb updated this revision to Diff 479492.
cjdb marked 4 inline comments as done.
cjdb added a comment.

responds to feedback


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138939/new/

https://reviews.llvm.org/D138939

Files:
  clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
  clang-tools-extra/clangd/Compiler.cpp
  clang-tools-extra/clangd/Diagnostics.cpp
  clang/include/clang/Basic/Diagnostic.h
  clang/include/clang/Basic/Diagnostic.td
  clang/include/clang/Basic/DiagnosticAST.h
  clang/include/clang/Basic/DiagnosticAnalysis.h
  clang/include/clang/Basic/DiagnosticComment.h
  clang/include/clang/Basic/DiagnosticCrossTU.h
  clang/include/clang/Basic/DiagnosticDriver.h
  clang/include/clang/Basic/DiagnosticFrontend.h
  clang/include/clang/Basic/DiagnosticIDs.h
  clang/include/clang/Basic/DiagnosticLex.h
  clang/include/clang/Basic/DiagnosticParse.h
  clang/include/clang/Basic/DiagnosticRefactoring.h
  clang/include/clang/Basic/DiagnosticSema.h
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Basic/DiagnosticSerialization.h
  clang/include/clang/Basic/PartialDiagnostic.h
  clang/include/clang/Frontend/ASTUnit.h
  clang/lib/Basic/Diagnostic.cpp
  clang/lib/Basic/DiagnosticIDs.cpp
  clang/lib/Format/TokenAnalyzer.cpp
  clang/lib/Frontend/ASTUnit.cpp
  clang/lib/Frontend/LogDiagnosticPrinter.cpp
  clang/lib/Frontend/SARIFDiagnosticPrinter.cpp
  clang/lib/Frontend/SerializedDiagnosticPrinter.cpp
  clang/lib/Frontend/TextDiagnosticBuffer.cpp
  clang/lib/Frontend/TextDiagnosticPrinter.cpp
  clang/lib/Sema/SemaOverload.cpp
  clang/test/Frontend/sarif-reason.cpp
  clang/test/TableGen/DiagnosticBase.inc
  clang/test/TableGen/deferred-diag.td
  clang/tools/clang-format/ClangFormat.cpp
  clang/tools/clang-import-test/clang-import-test.cpp
  clang/tools/diagtool/DiagnosticNames.cpp
  clang/unittests/Driver/SimpleDiagnosticConsumer.h
  clang/unittests/Driver/ToolChainTest.cpp
  clang/unittests/Frontend/FrontendActionTest.cpp
  clang/unittests/Tooling/RewriterTestContext.h
  clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
  flang/lib/Frontend/TextDiagnosticBuffer.cpp
  flang/lib/Frontend/TextDiagnosticPrinter.cpp
  libcxxabi/test/test_demangle.pass.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
  lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp

Index: lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
===
--- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
+++ lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
@@ -697,7 +697,7 @@
 const clang::Diagnostic &info) override {
 if (m_log) {
   llvm::SmallVector diag_str(10);
-  info.FormatDiagnostic(diag_str);
+  info.FormatLegacyDiagnostic(diag_str);
   diag_str.push_back('\0');
   LLDB_LOGF(m_log, "Compiler diagnostic: %s\n", diag_str.data());
 }
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
===
--- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -192,7 +192,7 @@
   Log *log = GetLog(LLDBLog::Expressions);
   if (log) {
 llvm::SmallVector diag_str;
-Info.FormatDiagnostic(diag_str);
+Info.FormatLegacyDiagnostic(diag_str);
 diag_str.push_back('\0');
 const char *plain_diag = diag_str.data();
 LLDB_LOG(log, "Received diagnostic outside parsing: {0}", plain_diag);
Index: flang/lib/Frontend/TextDiagnosticPrinter.cpp
===
--- flang/lib/Frontend/TextDiagnosticPrinter.cpp
+++ flang/lib/Frontend/TextDiagnosticPrinter.cpp
@@ -37,7 +37,8 @@
   // Render the diagnostic message into a temporary buffer eagerly. We'll use
   // this later as we print out the diagnostic to the terminal.
   llvm::SmallString<100> outStr;
-  info.FormatDiagnostic(outStr);
+  info.FormatSummary(outStr);
+  info.FormatLegacyDiagnostic(outStr);
 
   llvm::raw_svector_ostream diagMessageStream(outStr);
 
Index: flang/lib/Frontend/TextDiagnosticBuffer.cpp
===
--- flang/lib/Frontend/TextDiagnosticBuffer.cpp
+++ flang/lib/Frontend/TextDiagnosticBuffer.cpp
@@ -29,7 +29,8 @@
   DiagnosticConsumer::HandleDiagnostic(level, info);
 
   llvm::SmallString<100> buf;
-  info.FormatDiagnostic(buf);
+  info.FormatSummary(buf);
+  info.FormatLegacyDiagnostic(buf);
   switch (level) {
   default:
 llvm_unreachable("Diagnostic not handled during diagnostic buffering!");
Index: clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
===
--- clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
+++ clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
@@ -60

[Lldb-commits] [PATCH] D138939: [WIP][clang] adds a way to provide user-oriented reasons

2022-12-01 Thread Christopher Di Bella via Phabricator via lldb-commits
cjdb added a comment.

In D138939#3964677 , @erichkeane 
wrote:

> In D138939#3964439 , @erichkeane 
> wrote:
>
>> In D138939#3964404 , @cjdb wrote:
>>
>>> In D138939#3963496 , @erichkeane 
>>> wrote:
>>>
 In D138939#3963473 , @tschuett 
 wrote:

> Maybe `void FormatDiagnostic(SmallVectorImpl &OutStr, 
> DiagnosticMode mode)`instead of `void 
> FormatDiagnostic(SmallVectorImpl &OutStr)`?
> To make the transition easer and future proof.

 I like this idea.  Perhaps with DiagnosticMode being a 3-way enum:

   enum struct DiagnosticMode {
 Legacy,
 Sarif,  
 Default = Legacy
   }

 I like the idea in particular, since it makes a command line flag to 
 modify "Default" to be whichever the user prefers pretty trivial.
>>>
>>> There's already a flag for this: `-fdiagnostics-format=sarif`. Why do we 
>>> need a second diagnostic mode flag?
>>
>> Ah, oh... is the Sarif formatting being done with a new formatter?  That 
>> seems unfortunate, since folks using the other formatters won't be able to 
>> use the user friendly formats.
>
> I've been alerted offline that I am misunderstanding the Sarif proposal, and 
> where this is going.  I'll note that I wasn't present/invited at the calls 
> where all of this was discussed, so I am admittedly not completely up to 
> date.  The above concern shouldn't stop others from reviewing this, 
> particularly if you better understand the intent here.

I don't necessarily think you're the one misunderstanding here. We're 
definitely talking past one another, but I think it's equally likely that 
you're asking for something reasonable, and I'm mixing it up with something 
else.




Comment at: clang/include/clang/Frontend/DiagnosticRenderer.h:130
   /// \param Message The diagnostic message to emit.
+  /// \param Reason Supplementary information for the message.
   /// \param Ranges The underlined ranges for this code snippet.

rymiel wrote:
> Which parameter is this doxygen comment referring to?
Thanks, that was from an old iteration of the CL.



Comment at: clang/lib/Basic/Diagnostic.cpp:791
 
 /// FormatDiagnostic - Format this diagnostic into a string, substituting the
 /// formal arguments into the %0 slots.  The result is appended onto the Str

erichkeane wrote:
> Comment no longer matches.
I've deleted the comment because it's already in the header, and risks going 
stale over and over.



Comment at: clang/test/Frontend/sarif-reason.cpp:15
+void g() {
+  f1<0>(); // expected-error{{no matching function for call to 'f1'}}
+  f1(); // expected-error{{no matching function for call to 'f1'}}

erichkeane wrote:
> This is definitely a case where I'd love the diagnostics formatted/arranged 
> differently here.  If you can use the #BOOKMARK style to make sure errors and 
> notes are together, it would better illustrate what you're trying to do here.
This is maybe done? I'm not sure if this is the #BOOKMARK style you're 
referring to, but it should capture the same intent. Lemme know if you had 
something else in mind and I'll happily change it 🙂 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138939/new/

https://reviews.llvm.org/D138939

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D138939: [WIP][clang] adds a way to provide user-oriented reasons

2022-12-02 Thread Christopher Di Bella via Phabricator via lldb-commits
cjdb added a comment.

In D138939#3965985 , @tschuett wrote:

> Then Sarif was a distraction. Still to reduce boilerplate and for A/B testing:
>
>   enum class DiagnosticMode {
> Legacy,
> UserOriented,
> Default = Legacy
>   }

It took a fair bit of squinting and coffee, but I think I get it now. Having 
SARIF will be good for option 2: I hadn't realised this was at the Clang API 
level and not an enum for users to toggle on the command line! Thanks for your 
patience, I'll implement this now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138939/new/

https://reviews.llvm.org/D138939

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D138939: [WIP][clang] adds a way to provide user-oriented reasons

2022-12-02 Thread Christopher Di Bella via Phabricator via lldb-commits
cjdb added a comment.

In D138939#3966938 , @tschuett wrote:

> Maybe the kind/amount of information printed ( `DiagnosticMode` ) and the 
> output device (console/sarif) are orthogonal issues.
>
> Still it would nice to be able to toggle the diagnostic mode for 
> users/testing / A/B.

Hmm, are you asking for it to be possible for there to be legacy diagnostics 
with `-fdiagnostics-format=sarif` as well as user-oriented diagnostics? That 
should be doable, at least for now (I don't want to commit to this long-term in 
case it isn't viable at some point down the road, but it's hardly effort for 
what we currently support).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138939/new/

https://reviews.llvm.org/D138939

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D138939: [WIP][clang] adds a way to provide user-oriented reasons

2022-12-02 Thread Christopher Di Bella via Phabricator via lldb-commits
cjdb added a comment.

In D138939#3967397 , @tschuett wrote:

> I do not ask you to do anything! I just noticed that you add a lot of 
> `FormatXXXDiagnostic` functions. An alternativ design is to have one 
> `FormatDiagnostic` function with a mode parameter. Then you can decide 
> whether to print legacy or user-oriented reasons.
>
> If next year you invent another diagnostic, you can extend the enum and the 
> `FormatDiagnostic` function.

Makes sense to me! Thank you for clarifying.

In D138939#3967715 , @dblaikie wrote:

> Sorry if this is derailing, but I wonder/worry about a few things here:
>
> 1. Compounding structured output with phraseology - it seems like it might be 
> worthwhile for these to be separate issues

I agree with you. The reason I've compounded the two is to demonstrate how this 
is supposed to be used (otherwise it really feels like a nothing burger where 
I've made change for the sake of change).

> (doesn't mean the terminal output has to say exactly the same thing - as 
> you've mentioned, we could have some fields that aren't rendered in some 
> modes (eg: maybe a terminal only gets the summary, and not the reason - or 
> perhaps you can ask for reasons to be provided if you don't mind the 
> verbosity)). In the example case include here - describing the template 
> parameter kind mismatch seems OK for Clang's current textual diagnostic 
> experience & I don't think that would need to be limited to only the SARIF 
> output?

@rsmith and I spent a fair amount of time chatting about giving Clang a verbose 
diagnostic mode, and we agreed that would have issues:

1. If you wanted to use unstructured text in brief mode 90% of the time and 
then change when you need to clarify something, build systems are going to need 
to rebuild everything.
2. Because scripts almost certainly exist that consume the current diagnostics, 
I'm reluctant to alter those in any meaningful way. I even note this in the 
RFC, where I explicitly state that there are no current plans to bin the 
existing model.

> 2. Could the new phraseology be included in a separate/parallel diagnostic 
> file, essentially akin to a translation? Clang never did get support for 
> multiple languages in its diagnostics, but maybe this is the time to do that 
> work? And then have this new phrasing as the first "translation" of sorts?

Yes and no. For strict a rephrasing, this would be possible, but reasons aren't 
necessarily going to be just a rephrasing (the one in this patch is not). I 
intend for the reason section to be a far richer field that contains 
information that we've never previously provided before: a translation file 
can't help there. However, using parallel diagnostic files might not be such a 
bad idea. How do we ensure the two don't get out of sync?

> 3. I'm not sure I'd commit to calling the current diagnostic experience 
> "legacy" just yet &

You mentioned "terminal diagnostics" below. I like that a lot more than the 
original "unstructured reason" and "traditional reason", so let's go with that 
for now.

> maybe this is my broadest feedback: It'd be great to avoid a two-system 
> situation with the intent to merge things back in later.

I don't know how we can without breaking the promise of backwards compatibility.

> I think what I'd like to see (though I'm far from the decider in any of this) 
> would be that the existing underlying structured diagnostics system could 
> have a new emission system, that produces SARIF instead of text on a terminal 
> - same underlying structured representation, but providing that more directly 
> (in SARIF/JSON/etc) so that it's not lossy in the conversion to an output 
> format - essentially a machine-readable mode for clang's diagnostic output. 
> (to a file, to the terminal, beside the existing terminal output or instead 
> of it, whatever folks prefer) - this would, ideally, initially require no 
> changes to diagnostic API usage across clang.

I //think// you may be asking for what I mentioned here 
? That's doable and probably wise: I 
just need to add `-fdiagnostics-format=sarif-compatibility` (flag spelling to 
be bikeshed). (@tschuett it seems that this flag may happen regardless of 
whether you intended for it!)

> Diagnostic quality improvements, like the template parameter kind mismatch 
> can be committed independently as desired.

I'll coordinate with you next week to address my concerns here, but if we 
//can// achieve this, I'll be really happy. I'll be happier again if we can 
make it so both formats can have the change too :)

> Pretty much all of these features could be implemented somewhat in parallel, 
> each feature would be of value independently to varying degrees, and we 
> wouldn't end up with a deprecated/legacy/not ready yet situation (the only 
> "not ready yet" part might be adding the new diagnostic phrasings 

[Lldb-commits] [PATCH] D107528: [llvm][clang][NFC] updates inline licence info

2021-08-30 Thread Christopher Di Bella via Phabricator via lldb-commits
cjdb created this revision.
cjdb added reviewers: aaron.ballman, chandlerc, lattner, tonic.
Herald added subscribers: dexonsmith, martong, pengfei, arphaman, kbarton, 
hiraditya, nemanjai, qcolombet, MatzeB.
cjdb requested review of this revision.
Herald added projects: clang, LLDB, LLVM, clang-tools-extra.
Herald added subscribers: cfe-commits, llvm-commits, lldb-commits.

Some files still contained the old University of Illinois Open Source
Licence header. This patch replaces that with the Apache 2 with LLVM
Exception licence.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107528

Files:
  clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
  clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h
  clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
  clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h
  clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp
  clang-tools-extra/clang-tidy/objc/SuperSelfCheck.h
  clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.cpp
  clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.h
  clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.cpp
  clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.h
  clang/include/clang/AST/ASTConcept.h
  clang/include/clang/AST/ASTImporterSharedState.h
  clang/include/clang/AST/CurrentSourceLocExprScope.h
  clang/include/clang/AST/JSONNodeDumper.h
  clang/include/clang/Sema/SemaConcept.h
  clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
  clang/lib/AST/ASTConcept.cpp
  clang/lib/Format/MacroExpander.cpp
  clang/lib/Format/Macros.h
  clang/lib/Index/FileIndexRecord.cpp
  clang/lib/Sema/SemaConcept.cpp
  clang/lib/StaticAnalyzer/Core/SMTConstraintManager.cpp
  clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
  clang/unittests/Format/TestLexer.h
  clang/unittests/Tooling/RecursiveASTVisitorTests/LambdaTemplateParams.cpp
  lldb/docs/use/python.rst
  lldb/unittests/Symbol/TestLineEntry.cpp
  llvm/include/llvm/Analysis/HeatUtils.h
  llvm/include/llvm/CodeGen/MIRFormatter.h
  llvm/include/llvm/CodeGen/RegAllocCommon.h
  llvm/include/llvm/Support/ExtensibleRTTI.h
  llvm/include/llvm/Support/LICENSE.TXT
  llvm/include/llvm/Support/Signposts.h
  llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h
  llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerCommon.h
  llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h
  llvm/include/llvm/Transforms/Instrumentation/HWAddressSanitizer.h
  llvm/include/llvm/Transforms/Instrumentation/InstrOrderFile.h
  llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h
  llvm/include/llvm/Transforms/Utils/MemoryOpRemark.h
  llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
  llvm/lib/Analysis/HeatUtils.cpp
  llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp
  llvm/lib/Analysis/TFUtils.cpp
  llvm/lib/BinaryFormat/MsgPackDocumentYAML.cpp
  llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp
  llvm/lib/DebugInfo/GSYM/FileWriter.cpp
  llvm/lib/DebugInfo/GSYM/Range.cpp
  llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
  llvm/lib/ExecutionEngine/JITLink/ELF.cpp
  llvm/lib/ExecutionEngine/JITLink/JITLink.cpp
  llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp
  llvm/lib/ExecutionEngine/JITLink/MachO.cpp
  llvm/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp
  llvm/lib/Support/ExtensibleRTTI.cpp
  llvm/lib/Support/Signposts.cpp
  llvm/lib/Target/AArch64/AArch64StackTagging.cpp
  llvm/lib/Target/AArch64/AArch64StackTaggingPreRA.cpp
  llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
  llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.h
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFStreamer.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFStreamer.h
  llvm/lib/Target/X86/X86InstrKL.td
  llvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp
  llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp
  llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
  llvm/unittests/BinaryFormat/MsgPackDocumentTest.cpp
  llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
  llvm/unittests/Support/ExtensibleRTTITest.cpp

Index: llvm/unittests/Support/ExtensibleRTTITest.cpp
===
--- llvm/unittests/Support/ExtensibleRTTITest.cpp
+++ llvm/unittests/Support/ExtensibleRTTITest.cpp
@@ -1,9 +1,8 @@
 //===-- unittests/ExtensibleRTTITest.cpp - Extensible RTTI Tests --===//
 //
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===-

[Lldb-commits] [PATCH] D107528: [llvm][clang][NFC] updates inline licence info

2021-08-30 Thread Christopher Di Bella via Phabricator via lldb-commits
cjdb updated this revision to Diff 365648.
cjdb added a comment.

uploading solely for a fast visual inspection on the diff


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107528/new/

https://reviews.llvm.org/D107528

Files:
  clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
  clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h
  clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
  clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h
  clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp
  clang-tools-extra/clang-tidy/objc/SuperSelfCheck.h
  clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.cpp
  clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.h
  clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.cpp
  clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.h
  clang/include/clang/AST/ASTConcept.h
  clang/include/clang/AST/ASTImporterSharedState.h
  clang/include/clang/AST/CurrentSourceLocExprScope.h
  clang/include/clang/AST/JSONNodeDumper.h
  clang/include/clang/Sema/SemaConcept.h
  clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
  clang/lib/AST/ASTConcept.cpp
  clang/lib/Format/MacroExpander.cpp
  clang/lib/Format/Macros.h
  clang/lib/Index/FileIndexRecord.cpp
  clang/lib/Sema/SemaConcept.cpp
  clang/lib/StaticAnalyzer/Core/SMTConstraintManager.cpp
  clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
  clang/unittests/Format/TestLexer.h
  clang/unittests/Tooling/RecursiveASTVisitorTests/LambdaTemplateParams.cpp
  lldb/docs/use/python.rst
  lldb/unittests/Symbol/TestLineEntry.cpp
  llvm/include/llvm/Analysis/HeatUtils.h
  llvm/include/llvm/CodeGen/MIRFormatter.h
  llvm/include/llvm/CodeGen/RegAllocCommon.h
  llvm/include/llvm/Support/ExtensibleRTTI.h
  llvm/include/llvm/Support/LICENSE.TXT
  llvm/include/llvm/Support/Signposts.h
  llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h
  llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerCommon.h
  llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h
  llvm/include/llvm/Transforms/Instrumentation/HWAddressSanitizer.h
  llvm/include/llvm/Transforms/Instrumentation/InstrOrderFile.h
  llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h
  llvm/include/llvm/Transforms/Utils/MemoryOpRemark.h
  llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
  llvm/lib/Analysis/HeatUtils.cpp
  llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp
  llvm/lib/Analysis/TFUtils.cpp
  llvm/lib/BinaryFormat/MsgPackDocumentYAML.cpp
  llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp
  llvm/lib/DebugInfo/GSYM/FileWriter.cpp
  llvm/lib/DebugInfo/GSYM/Range.cpp
  llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
  llvm/lib/ExecutionEngine/JITLink/ELF.cpp
  llvm/lib/ExecutionEngine/JITLink/JITLink.cpp
  llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp
  llvm/lib/ExecutionEngine/JITLink/MachO.cpp
  llvm/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp
  llvm/lib/Support/ExtensibleRTTI.cpp
  llvm/lib/Support/Signposts.cpp
  llvm/lib/Target/AArch64/AArch64StackTagging.cpp
  llvm/lib/Target/AArch64/AArch64StackTaggingPreRA.cpp
  llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
  llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.h
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFStreamer.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFStreamer.h
  llvm/lib/Target/X86/X86InstrKL.td
  llvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp
  llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp
  llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
  llvm/unittests/BinaryFormat/MsgPackDocumentTest.cpp
  llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
  llvm/unittests/Support/ExtensibleRTTITest.cpp

Index: llvm/unittests/Support/ExtensibleRTTITest.cpp
===
--- llvm/unittests/Support/ExtensibleRTTITest.cpp
+++ llvm/unittests/Support/ExtensibleRTTITest.cpp
@@ -1,9 +1,8 @@
 //===-- unittests/ExtensibleRTTITest.cpp - Extensible RTTI Tests --===//
 //
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===--===//
 
Index: llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
===
--- llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
+++ llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
@@ -1,9 +1,8 @@
 //===- llvm/unittest/DebugInfo/GSYMTest.cpp --

[Lldb-commits] [PATCH] D107528: [llvm][clang][NFC] updates inline licence info

2021-08-30 Thread Christopher Di Bella via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
cjdb marked 3 inline comments as done.
Closed by commit rGc874dd53628d: [llvm][clang][NFC] updates inline licence info 
(authored by cjdb).

Changed prior to commit:
  https://reviews.llvm.org/D107528?vs=365648&id=365649#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107528/new/

https://reviews.llvm.org/D107528

Files:
  clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.cpp
  clang-tools-extra/clang-tidy/bugprone/BranchCloneCheck.h
  clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
  clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h
  clang-tools-extra/clang-tidy/objc/SuperSelfCheck.cpp
  clang-tools-extra/clang-tidy/objc/SuperSelfCheck.h
  clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.cpp
  clang-tools-extra/clang-tidy/readability/ConvertMemberFunctionsToStatic.h
  clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.cpp
  clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.h
  clang/include/clang/AST/ASTConcept.h
  clang/include/clang/AST/ASTImporterSharedState.h
  clang/include/clang/AST/CurrentSourceLocExprScope.h
  clang/include/clang/AST/JSONNodeDumper.h
  clang/include/clang/Sema/SemaConcept.h
  clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h
  clang/lib/AST/ASTConcept.cpp
  clang/lib/Format/MacroExpander.cpp
  clang/lib/Format/Macros.h
  clang/lib/Index/FileIndexRecord.cpp
  clang/lib/Sema/SemaConcept.cpp
  clang/lib/StaticAnalyzer/Core/SMTConstraintManager.cpp
  clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
  clang/unittests/Format/TestLexer.h
  clang/unittests/Tooling/RecursiveASTVisitorTests/LambdaTemplateParams.cpp
  lldb/docs/use/python.rst
  lldb/unittests/Symbol/TestLineEntry.cpp
  llvm/include/llvm/Analysis/HeatUtils.h
  llvm/include/llvm/CodeGen/MIRFormatter.h
  llvm/include/llvm/CodeGen/RegAllocCommon.h
  llvm/include/llvm/Support/ExtensibleRTTI.h
  llvm/include/llvm/Support/LICENSE.TXT
  llvm/include/llvm/Support/Signposts.h
  llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h
  llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerCommon.h
  llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h
  llvm/include/llvm/Transforms/Instrumentation/HWAddressSanitizer.h
  llvm/include/llvm/Transforms/Instrumentation/InstrOrderFile.h
  llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h
  llvm/include/llvm/Transforms/Utils/MemoryOpRemark.h
  llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
  llvm/lib/Analysis/HeatUtils.cpp
  llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp
  llvm/lib/Analysis/TFUtils.cpp
  llvm/lib/BinaryFormat/MsgPackDocumentYAML.cpp
  llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp
  llvm/lib/DebugInfo/GSYM/FileWriter.cpp
  llvm/lib/DebugInfo/GSYM/Range.cpp
  llvm/lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
  llvm/lib/ExecutionEngine/JITLink/ELF.cpp
  llvm/lib/ExecutionEngine/JITLink/JITLink.cpp
  llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp
  llvm/lib/ExecutionEngine/JITLink/MachO.cpp
  llvm/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp
  llvm/lib/Support/ExtensibleRTTI.cpp
  llvm/lib/Support/Signposts.cpp
  llvm/lib/Target/AArch64/AArch64StackTagging.cpp
  llvm/lib/Target/AArch64/AArch64StackTaggingPreRA.cpp
  llvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
  llvm/lib/Target/CSKY/AsmParser/CSKYAsmParser.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFStreamer.h
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFStreamer.cpp
  llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFStreamer.h
  llvm/lib/Target/X86/X86InstrKL.td
  llvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp
  llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp
  llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
  llvm/unittests/BinaryFormat/MsgPackDocumentTest.cpp
  llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
  llvm/unittests/Support/ExtensibleRTTITest.cpp

Index: llvm/unittests/Support/ExtensibleRTTITest.cpp
===
--- llvm/unittests/Support/ExtensibleRTTITest.cpp
+++ llvm/unittests/Support/ExtensibleRTTITest.cpp
@@ -1,9 +1,8 @@
 //===-- unittests/ExtensibleRTTITest.cpp - Extensible RTTI Tests --===//
 //
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===--===//
 
Index: llvm/unittests/DebugInfo/GSYM/GSYMTest.cpp
===