|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2 |
|
| #
64ab2b1d |
| 20-Aug-2021 |
Corentin Jabot <[email protected]> |
Improve handling of static assert messages.
Instead of dumping the string literal (which quotes it and escape every non-ascii symbol), we can use the content of the string when it is a 8 byte string
Improve handling of static assert messages.
Instead of dumping the string literal (which quotes it and escape every non-ascii symbol), we can use the content of the string when it is a 8 byte string.
Wide, UTF-8/UTF-16/32 strings are still completely escaped, until we clarify how these entities should behave (cf https://wg21.link/p2361).
`FormatDiagnostic` is modified to escape non printable characters and invalid UTF-8.
This ensures that unicode characters, spaces and new lines are properly rendered in static messages. This make clang more consistent with other implementation and fixes this tweet https://twitter.com/jfbastien/status/1298307325443231744 :)
Of note, `PaddingChecker` did print out new lines that were later removed by the diagnostic printing code. To be consistent with its tests, the new lines are removed from the diagnostic.
Unicode tables updated to both use the Unicode definitions and the Unicode 14.0 data.
U+00AD SOFT HYPHEN is still considered a print character to match existing practices in terminals, in addition of being considered a formatting character as per Unicode.
Reviewed By: aaron.ballman, #clang-language-wg
Differential Revision: https://reviews.llvm.org/D108469
show more ...
|
| #
a774ba7f |
| 28-Jun-2022 |
Corentin Jabot <[email protected]> |
Revert "Improve handling of static assert messages."
This reverts commit 870b6d21839707a3e4c40a29b526995f065a220f.
This seems to break some libc++ tests, reverting while investigating
|
| #
870b6d21 |
| 20-Aug-2021 |
Corentin Jabot <[email protected]> |
Improve handling of static assert messages.
Instead of dumping the string literal (which quotes it and escape every non-ascii symbol), we can use the content of the string when it is a 8 byte string
Improve handling of static assert messages.
Instead of dumping the string literal (which quotes it and escape every non-ascii symbol), we can use the content of the string when it is a 8 byte string.
Wide, UTF-8/UTF-16/32 strings are still completely escaped, until we clarify how these entities should behave (cf https://wg21.link/p2361).
`FormatDiagnostic` is modified to escape non printable characters and invalid UTF-8.
This ensures that unicode characters, spaces and new lines are properly rendered in static messages. This make clang more consistent with other implementation and fixes this tweet https://twitter.com/jfbastien/status/1298307325443231744 :)
Of note, `PaddingChecker` did print out new lines that were later removed by the diagnostic printing code. To be consistent with its tests, the new lines are removed from the diagnostic.
Unicode tables updated to both use the Unicode definitions and the Unicode 14.0 data.
U+00AD SOFT HYPHEN is still considered a print character to match existing practices in terminals, in addition of being considered a formatting character as per Unicode.
Reviewed By: aaron.ballman, #clang-language-wg
Differential Revision: https://reviews.llvm.org/D108469
show more ...
|
| #
946c45a4 |
| 24-Jun-2022 |
Tapasweni Pathak <[email protected]> |
Implement soft reset of the diagnostics engine.
This patch implements soft reset and adds tests for soft reset success of the diagnostics engine. This allows us to recover from errors in clang-repl
Implement soft reset of the diagnostics engine.
This patch implements soft reset and adds tests for soft reset success of the diagnostics engine. This allows us to recover from errors in clang-repl without resetting the pragma handlers' state.
Differential revision: https://reviews.llvm.org/D126183
show more ...
|
| #
52ce95a1 |
| 28-Apr-2022 |
Ken Matsui <[email protected]> |
[NFC] Prevent shadowing a variable declared in `if`
Prevents confusion over which `S` is referenced in the final `else` branch if such use is added.
Reviewed By: hubert.reinterpretcast
Differentia
[NFC] Prevent shadowing a variable declared in `if`
Prevents confusion over which `S` is referenced in the final `else` branch if such use is added.
Reviewed By: hubert.reinterpretcast
Differential Revision: https://reviews.llvm.org/D124556
show more ...
|
| #
a7691dee |
| 12-Apr-2022 |
Sam McCall <[email protected]> |
[Testing] TestAST, a helper for writing straight-line AST tests
Tests that need ASTs have to deal with the awkward control flow of FrontendAction in some way. There are a few idioms used: - don't b
[Testing] TestAST, a helper for writing straight-line AST tests
Tests that need ASTs have to deal with the awkward control flow of FrontendAction in some way. There are a few idioms used: - don't bother with unit tests, use clang -dump-ast - create an ASTConsumer by hand, which is bulky - use ASTMatchFinder - works pretty well if matchers are actually needed, very strange if they are not - use ASTUnit - this yields nice straight-line code, but ASTUnit is a terrifically complicated library not designed for this purpose
TestAST provides a very simple way to write straight-line tests: specify the code/flags and it provides an AST that is kept alive until the object is destroyed. It's loosely modeled after TestTU in clangd, which we've successfully used for a variety of tests.
I've updated a couple of clang tests to use this helper, IMO they're clearer.
Differential Revision: https://reviews.llvm.org/D123668
show more ...
|
| #
d789ea71 |
| 17-Sep-2021 |
Wolfgang Pieb <[email protected]> |
[Diagnostics] Don't drop a statically set NoWarningAsError flag during option processing
When a -W<diag> option is given on the command line, and the corresponding diagnostic has the NoWarnOnError f
[Diagnostics] Don't drop a statically set NoWarningAsError flag during option processing
When a -W<diag> option is given on the command line, and the corresponding diagnostic has the NoWarnOnError flag set, prevent the flag from being dropped when the severity is reevaluated. This fixes PR51837.
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D109981
show more ...
|
| #
afdac5fb |
| 05-Oct-2021 |
Arthur Eubanks <[email protected]> |
[clang] Allow printing 64 bit ints in diagnostics
Currently we're limited to 32 bit ints in diagnostics. With support for 4GB alignments coming soon, we need to report 4GB as the max alignment allow
[clang] Allow printing 64 bit ints in diagnostics
Currently we're limited to 32 bit ints in diagnostics. With support for 4GB alignments coming soon, we need to report 4GB as the max alignment allowed. I've tested that this does indeed properly print 2^32.
Reviewed By: rsmith
Differential Revision: https://reviews.llvm.org/D111184
show more ...
|
| #
cb89d373 |
| 06-Oct-2021 |
Arthur Eubanks <[email protected]> |
Revert "[clang] Allow printing 64 bit ints in diagnostics"
This reverts commit edfff2f8b0435bc4af94bd3b41bf57244d84d993.
Breaks clang-tidy.
|
| #
edfff2f8 |
| 05-Oct-2021 |
Arthur Eubanks <[email protected]> |
[clang] Allow printing 64 bit ints in diagnostics
Currently we're limited to 32 bit ints in diagnostics. With support for 4GB alignments coming soon, we need to report 4GB as the max alignment allow
[clang] Allow printing 64 bit ints in diagnostics
Currently we're limited to 32 bit ints in diagnostics. With support for 4GB alignments coming soon, we need to report 4GB as the max alignment allowed. I've tested that this does indeed properly print 2^32.
Reviewed By: rsmith
Differential Revision: https://reviews.llvm.org/D111184
show more ...
|
| #
e31899c7 |
| 30-Sep-2021 |
Nico Weber <[email protected]> |
Reland "[clang-cl] Accept `#pragma warning(disable : N)` for some N"
This reverts commit 0cd9d8a48bdddb17de2c6388f9d775353f9acab9 and adds the changes described in https://reviews.llvm.org/D110668#3
Reland "[clang-cl] Accept `#pragma warning(disable : N)` for some N"
This reverts commit 0cd9d8a48bdddb17de2c6388f9d775353f9acab9 and adds the changes described in https://reviews.llvm.org/D110668#3034461.
show more ...
|
| #
0cd9d8a4 |
| 30-Sep-2021 |
Amy Huang <[email protected]> |
Revert "[clang-cl] Accept `#pragma warning(disable : N)` for some N" because it causes `error: error reading '/wd4091'` errors in compiler-rt builds.
|
| #
b2de52be |
| 28-Sep-2021 |
Nico Weber <[email protected]> |
[clang-cl] Accept `#pragma warning(disable : N)` for some N
clang-cl maps /wdNNNN to -Wno-flags for a few warnings that map cleanly from cl.exe concepts to clang concepts.
This patch adds support f
[clang-cl] Accept `#pragma warning(disable : N)` for some N
clang-cl maps /wdNNNN to -Wno-flags for a few warnings that map cleanly from cl.exe concepts to clang concepts.
This patch adds support for the same numbers to `#pragma warning(disable : NNNN)`. It also lets `#pragma warning(push)` and `#pragma warning(pop)` have an effect, since these are used together with `warning(disable)`.
The optional numeric argument to `warning(push)` is ignored, as are the other non-`disable` `pragma warning()` arguments. (Supporting `error` would be easy, but we also don't support `/we`, and those should probably be added together.)
The motivating example is that a bunch of code (including in LLVM) uses this idiom to locally disable warnings about calls to deprecated functions in Windows-only code, and 4996 maps nicely to -Wno-deprecated-declarations:
#pragma warning(push) #pragma warning(disable: 4996) f(); #pragma warning(pop)
Implementation-wise: - Move `/wd` flag handling from Options.td to actual Driver-level code - Extract the function mapping cl.exe IDs to warning groups to the new file clang/lib/Basic/CLWarnings.cpp - Create a diag::Group enum so that CLWarnings.cpp can refer to existing groups by ID (and give DllexportExplicitInstantiationDecl a named group), and add a function to map a diag::Group to the spelling of it's associated commandline flag - Call that new function from PragmaWarningHandler
Differential Revision: https://reviews.llvm.org/D110668
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
| #
9cd2413f |
| 07-Dec-2020 |
Erik Pilkington <[email protected]> |
[clang] Add a new nullability annotation for swift async: _Nullable_result
_Nullable_result generally like _Nullable, except when being imported into a swift async method. rdar://70106409
Different
[clang] Add a new nullability annotation for swift async: _Nullable_result
_Nullable_result generally like _Nullable, except when being imported into a swift async method. rdar://70106409
Differential revision: https://reviews.llvm.org/D92495
show more ...
|
|
Revision tags: llvmorg-11.0.1-rc1 |
|
| #
d44edfc1 |
| 17-Nov-2020 |
Nathan James <[email protected]> |
[clang][NFC] Use SmallString instead of SmallVector<char
Simplifies code in some places and is more explicit about what is being used. No additional includes were added here so no impact on compile
[clang][NFC] Use SmallString instead of SmallVector<char
Simplifies code in some places and is more explicit about what is being used. No additional includes were added here so no impact on compile time.
show more ...
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4 |
|
| #
7e561b62 |
| 23-Sep-2020 |
Yaxun (Sam) Liu <[email protected]> |
[NFC] Refactor DiagnosticBuilder and PartialDiagnostic
PartialDiagnostic misses some functions compared to DiagnosticBuilder.
This patch refactors DiagnosticBuilder and PartialDiagnostic, extracts
[NFC] Refactor DiagnosticBuilder and PartialDiagnostic
PartialDiagnostic misses some functions compared to DiagnosticBuilder.
This patch refactors DiagnosticBuilder and PartialDiagnostic, extracts the common functionality so that the streaming << operators are shared.
Differential Revision: https://reviews.llvm.org/D84362
show more ...
|
| #
54c1bcab |
| 14-Oct-2020 |
Duncan P. N. Exon Smith <[email protected]> |
clang/Basic: Stop using SourceManager::getBuffer, NFC
Update clang/lib/Basic to stop relying on a `MemoryBuffer*`, using the `MemoryBufferRef` from `getBufferOrNone` or `getBufferOrFake` instead of
clang/Basic: Stop using SourceManager::getBuffer, NFC
Update clang/lib/Basic to stop relying on a `MemoryBuffer*`, using the `MemoryBufferRef` from `getBufferOrNone` or `getBufferOrFake` instead of `getBuffer`.
Differential Revision: https://reviews.llvm.org/D89394
show more ...
|
| #
276f68ea |
| 24-Sep-2020 |
Reid Kleckner <[email protected]> |
Revert "Add a static_assert confirming that DiagnosticBuilder is small"
This reverts commit a32feed0dbeac7606d042d0d7e041c9eaf12cd51.
This assert doesn't hold in 32-bit builds, I didn't do the math
Revert "Add a static_assert confirming that DiagnosticBuilder is small"
This reverts commit a32feed0dbeac7606d042d0d7e041c9eaf12cd51.
This assert doesn't hold in 32-bit builds, I didn't do the math right.
show more ...
|
| #
a32feed0 |
| 24-Sep-2020 |
Reid Kleckner <[email protected]> |
Add a static_assert confirming that DiagnosticBuilder is small
|
| #
b62fd436 |
| 24-Sep-2020 |
Reid Kleckner <[email protected]> |
Revert "Recommit [NFC] Refactor DiagnosticBuilder and PartialDiagnostic"
This reverts commit 8e780a1653e6f87755a447e921b8f929d8b70996.
DiagnosticBuilder is a value type, created on the stack everyw
Revert "Recommit [NFC] Refactor DiagnosticBuilder and PartialDiagnostic"
This reverts commit 8e780a1653e6f87755a447e921b8f929d8b70996.
DiagnosticBuilder is a value type, created on the stack everywhere. IMO we should not be adding a vtable to it, and making very operator<< use a virtual interface. There are other feasible designs for implementing this. The original review, D84362, was approved by @tra, who is responsible for Clang's CUDA support, but it wasn't reviewed by @rsmith or anyone responsible for clang's diagnostic library.
show more ...
|
| #
8e780a16 |
| 23-Sep-2020 |
Yaxun (Sam) Liu <[email protected]> |
Recommit [NFC] Refactor DiagnosticBuilder and PartialDiagnostic
This recommits 829d14ee0a6aa79c89f7f3d9fcd9d27d3efd2b91.
The patch was reverted due to a regression in some CUDA app which was though
Recommit [NFC] Refactor DiagnosticBuilder and PartialDiagnostic
This recommits 829d14ee0a6aa79c89f7f3d9fcd9d27d3efd2b91.
The patch was reverted due to a regression in some CUDA app which was thought to be caused by this patch. However, investigation showed that the regression was due to some other issues, therefore recommit this patch.
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc3 |
|
| #
829d14ee |
| 17-Sep-2020 |
Yaxun (Sam) Liu <[email protected]> |
Revert "[NFC] Refactor DiagnosticBuilder and PartialDiagnostic"
This reverts commit ee5519d323571c4a9a7d92cb817023c9b95334cd.
|
|
Revision tags: llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1 |
|
| #
ee5519d3 |
| 22-Jul-2020 |
Yaxun (Sam) Liu <[email protected]> |
[NFC] Refactor DiagnosticBuilder and PartialDiagnostic
PartialDiagnostic misses some functions compared to DiagnosticBuilder.
This patch refactors DiagnosticBuilder and PartialDiagnostic, extracts
[NFC] Refactor DiagnosticBuilder and PartialDiagnostic
PartialDiagnostic misses some functions compared to DiagnosticBuilder.
This patch refactors DiagnosticBuilder and PartialDiagnostic, extracts the common functionality so that the streaming << operators are shared.
Differential Revision: https://reviews.llvm.org/D84362
show more ...
|
|
Revision tags: llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1 |
|
| #
76221c73 |
| 06-Apr-2020 |
Reid Kleckner <[email protected]> |
Remove llvm::Error include form Diagnostic.h
Saves ~400 related LLVM ADT. llvm/ADT/Error.h takes 90ms to parse.
$ diff -u <(sort thedeps-before.txt) <(sort thedeps-after.txt) \ | grep '^[-+] '
Remove llvm::Error include form Diagnostic.h
Saves ~400 related LLVM ADT. llvm/ADT/Error.h takes 90ms to parse.
$ diff -u <(sort thedeps-before.txt) <(sort thedeps-after.txt) \ | grep '^[-+] ' | sort | uniq -c | sort -nr 403 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/Support/Error.h 403 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm-c/Error.h 397 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/Support/Format.h 397 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/Support/Debug.h 377 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/ADT/StringExtras.h 158 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm-c/ExternC.h 138 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/Support/ErrorOr.h 13 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/Support/raw_ostream.h 13 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/ADT/SmallString.h 5 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/ADT/Twine.h
show more ...
|
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init |
|
| #
ed8dadb3 |
| 13-Dec-2019 |
Anastasia Stulova <[email protected]> |
[Sema] Improve diagnostic about addr spaces for overload candidates
Allow sending address spaces into diagnostics to simplify and improve error reporting. Improved wording of diagnostics for address
[Sema] Improve diagnostic about addr spaces for overload candidates
Allow sending address spaces into diagnostics to simplify and improve error reporting. Improved wording of diagnostics for address spaces in overloading.
Tags: #clang
Differential Revision: https://reviews.llvm.org/D71111
show more ...
|