KKazu HirataUse value instead of getValue (NFC)
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[clang] Emit SARIF Diagnostics: Create clang::SarifDocumentWriter interface [clang] Emit SARIF Diagnostics: Create clang::SarifDocumentWriter interface Create an interface for writing SARIF documents from within clang: The primary intent of this change is to introduce the interface clang::SarifDocumentWriter, which allows incrementally adding diagnostic data to a JSON backed document. The proposed interface is not yet connected to the compiler internals, which will be covered in future work. As such this change will not change the input/output interface of clang. This change also introduces the clang::FullSourceRange type that is modeled after clang::SourceRange + clang::FullSourceLoc, this is useful for packaging a pair of clang::SourceLocation objects with their corresponding SourceManagers. Previous discussions: RFC for this change: https://lists.llvm.org/pipermail/cfe-dev/2021-March/067907.html https://lists.llvm.org/pipermail/cfe-dev/2021-July/068480.html SARIF Standard (2.1.0): https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html Differential Revision: https://reviews.llvm.org/D109701 | 3 年前 | |
Cleanup identifier parsing; NFC Rename methods to clearly signal when they only deal with ASCII, simplify the parsing of identifier, and use start/continue instead of head/body for consistency with Unicode terminology. | 4 年前 | |
[clang, clang-tools-extra] Use has_value instead of hasValue (NFC) | 3 年前 | |
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 | 3 年前 | |
Remove a few effectively-unused FileEntry APIs. NFC - isValid: FileManager only ever returns valid FileEntries (see next point) - construction from outside FileManager (both FileEntry and DirectoryEntry). It's not possible to create a useful FileEntry this way, there are no setters. This was only used in FileEntryTest, added a friend to enable this. A real constructor is cleaner but requires larger changes to FileManager. Differential Revision: https://reviews.llvm.org/D123197 | 4 年前 | |
Fix a buglet in remove_dots(). The function promises to canonicalize the path, but neglected to do so for the root component. For example, calling remove_dots("/tmp/foo.c", Style::windows_backslash) resulted in "/tmp\foo.c". Now it produces "\tmp\foo.c". Also fix FIXME in the corresponding test. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D126412 | 3 年前 | |
[clang][unittest] Don't hardcode the string "Assertion" This depends on the libc implementation. Use the string from the assertion message instead. Overly specific, but so is this entire test. | 5 年前 | |
[clang][cli] Generate and round-trip language options This patch implements generation of remaining language options and tests it by performing parse-generate-parse round trip (on by default for assert builds, off otherwise). This patch also correctly reports failures in parseSanitizerKinds, which is necessary for emitting diagnostics when an invalid sanitizer is passed to -fsanitize= during round-trip. This patch also removes TableGen marshalling classes from two options: * fsanitize_blacklist When parsing: it's first initialized via the generated code, but then also changed by manually written code, which is confusing. * fopenmp When parsing: it's first initialized via generated code, but then conditionally changed by manually written code. This is also confusing. Moreover, we need to do some extra checks when generating it, which would be really cumbersome in TableGen. (Specifically, not emitting it when -fopenmp-simd was present.) Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D95793 | 5 年前 | |
Use value instead of getValue (NFC) | 3 年前 | |
Allow interfaces to operate on in-memory buffers with no source location info. This patch is a part of the upstreaming efforts. Cling has the ability to spawn child interpreters (mainly for auto completions). The child interpreter import Decls using the ASTImporter which casuses the assertion here https://github.com/llvm/llvm-project/blob/65eb74e94b414fcde6bfa810d1c30c7fcb136b77/clang/include/clang/Basic/SourceLocation.h#L322 The patch is co-developed with V. Vassilev. Differential revision: https://reviews.llvm.org/D88780 | 3 年前 |