| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[clang][AArch64][SVE] Change SVE_VECTOR_OPERATORS macro for VLA vectors The __ARM_FEATURE_SVE_VECTOR_OPERATORS macro should be changed to indicate that this feature is now supported on VLA vectors as well as VLS vectors. There is a complementary PR to the ACLE spec here https://github.com/ARM-software/acle/pull/213 Reviewed By: peterwaller-arm Differential Revision: https://reviews.llvm.org/D131573 (cherry picked from commit 13a784f368ef062a7bd652829bcf8bbdd94dc659) | 3 年前 | |
[Attributes] Remove AttrSyntax and migrate uses to AttributeCommonInfo::Syntax (NFC) This is setup for allowing hasAttribute to work for plugin-provided attributes Differential Revision: https://reviews.llvm.org/D126902 | 4 年前 | |
[clang] Fix __has_builtin Fix __has_builtin to return 1 only if the requested target features of a builtin are enabled by refactoring the code for checking required target features of a builtin and use it in evaluation of __has_builtin. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D125829 | 4 年前 | |
[clang] Fix __has_builtin Fix __has_builtin to return 1 only if the requested target features of a builtin are enabled by refactoring the code for checking required target features of a builtin and use it in evaluation of __has_builtin. Reviewed by: Artem Belevich Differential Revision: https://reviews.llvm.org/D125829 | 4 年前 | |
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. | 4 年前 | |
[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 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[NFC] Remove duplicate isNoBuiltinFunc method It's available both in CodeGenOptions and in LangOptions, and LangOptions implementation is slightly better as it uses a StringRef instead of a char pointer, so use it. Differential Revision: https://reviews.llvm.org/D98175 | 5 年前 | |
[clang] Use value_or instead of getValueOr (NFC) | 3 年前 | |
[Clang] Extract availability mapping from VersionMap for watchOS/tvOS This change makes it possible to extract iOS-to-another-platform version mappings from VersionMap in the SDKSettings.json file in Darwin SDKs, for example, iOS_watchOS and iOS_tvOS. This code was originally authored by Alex Lorenz. rdar://81491680 Differential Revision: https://reviews.llvm.org/D116615 | 4 年前 | |
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 | 3 年前 | |
[clang][tablegen] adds human documentation to WarningOption Building on D126796, this commit adds the infrastructure for being able to print out descriptions of what each warning does. Differential Revision: https://reviews.llvm.org/D126832 | 3 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[clang][NFC] Generate the {Type,ArrayType,UnaryExprOrType,Expression}Traits... ...enumerations from TokenKinds.def and use the new macros from TokenKinds.def to remove the hard-coded lists of traits. All the information needed to generate these enumerations is already present in TokenKinds.def. The motivation here is to be able to dump the trait spelling without hard-coding the list in yet another place. Note that this change the order of the enumerators in the enumerations (except that in the TypeTrait enumeration all unary type traits are before all binary type traits, and all binary type traits are before all n-ary type traits). Apart from the aforementioned ordering which is relied upon, after this patch no code in clang or in the various clang tools depend on the specific ordering of the enumerators. No functional changes intended. Differential Revision: https://reviews.llvm.org/D81455 Reviewed By: aaron.ballman | 5 年前 | |
Basic: Add native support for stdin to SourceManager and FileManager Add support for stdin to SourceManager and FileManager. Adds FileManager::getSTDIN, which adds a FileEntryRef for <stdin> and reads the MemoryBuffer, which is stored as FileEntry::Content. Eventually the other buffers in ContentCache will sink to here as well -- we probably usually want to load/save a MemoryBuffer eagerly -- but it's happening early for stdin to get rid of CompilerInstance::InitializeSourceManager's final call to SourceManager::overrideFileContents. clang/test/CXX/modules-ts/dcl.dcl/dcl.module/dcl.module.export/p1.cpp relies on building a module from stdin; supporting that requires setting ContentCache::BufferOverridden. Differential Revision: https://reviews.llvm.org/D93148 | 5 年前 | |
[VFS] RedirectingFileSystem only replace path if not already mapped If the ExternalFS has already remapped to an external path then RedirectingFileSystem should not change it to the originally provided path. This fixes the original path always being used if multiple VFS overlays were provided and the path wasn't found in the highest (ie. first in the chain). For now this is accomplished through the use of a new ExposesExternalVFSPath field on vfs::Status. This flag is true when the Status has an external path that's different from its virtual path, ie. the contained path is the external path. See the plan in FileManager::getFileRef for where this is going - eventually we won't need IsVFSMapped any more and all returned paths should be virtual. Resolves rdar://90578880 and llvm-project#53306. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D123398 | 4 年前 | |
[FileSystemStatCache] Return std::error_code from stat cache methods Summary: Previously, we would return true/false signifying if the cache/lookup succeeded or failed. Instead, provide clients with the underlying error that was thrown while attempting to look up in the cache. Since clang::FileManager doesn't make use of this information, it discards the error that's received and casts away to bool. This change is NFC. Reviewers: benlangmuir, arphaman Subscribers: dexonsmith, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60735 llvm-svn: 358509 | 7 年前 | |
[clang] Fix KEYALL Update KEYALL to cover KEYCUDA. Introduce KEYMAX and a generic way to update KEYALL. Reviewed by: Dan Liew Differential Revision: https://reviews.llvm.org/D125396 | 4 年前 | |
[FPEnv] Allow CompoundStmt to keep FP options This is a recommit of b822efc7404bf09ccfdc1ab7657475026966c3b2, reverted in dc34d8df4c48b3a8f474360970cae8a58e6c84f0. The commit caused fails because the test ast-print-fp-pragmas.c did not specify particular target, and it failed on targets which do not support constrained intrinsics. The original commit message is below. AST does not have special nodes for pragmas. Instead a pragma modifies some state variables of Sema, which in turn results in modified attributes of AST nodes. This technique applies to floating point operations as well. Every AST node that can depend on FP options keeps current set of them. This technique works well for options like exception behavior or fast math options. They represent instructions to the compiler how to modify code generation for the affected nodes. However treatment of FP control modes has problems with this technique. Modifying FP control mode (like rounding direction) usually requires operations on hardware, like writing to control registers. It must be done prior to the first operation that depends on the control mode. In particular, such operations are required for implementation of pragma STDC FENV_ROUND, compiler should set up necessary rounding direction at the beginning of compound statement where the pragma occurs. As there is no representation for pragmas in AST, the code generation becomes a complicated task in this case. To solve this issue FP options are kept inside CompoundStmt. Unlike to FP options in expressions, these does not affect any operation on FP values, but only inform the codegen about the FP options that act in the body of the statement. As all pragmas that modify FP environment may occurs only at the start of compound statement or at global level, such solution works for all relevant pragmas. The options are kept as a difference from the options in the enclosing compound statement or default options, it helps codegen to set only changed control modes. Differential Revision: https://reviews.llvm.org/D123952 | 3 年前 | |
Change default C dialect for PS5 to gnu17/gnu18. Differential Revision: https://reviews.llvm.org/D129404 | 3 年前 | |
Ensure newlines at the end of files (NFC) | 3 年前 | |
[clang][modules] Report module maps affecting no_undeclared_includes modules Since D106876, PCM files don't report module maps as input files unless they contributed to the compilation. Reporting only module maps of (transitively) imported modules is not enough, though. For modules marked with [no_undeclared_includes], other module maps affect the compilation by introducing anti-dependencies. This patch makes sure such module maps are being reported as input files. Depends on D120463. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D120464 | 4 年前 | |
[sanitizer] Add "mainfile" prefix to sanitizer special case list When an issue exists in the main file (caller) instead of an included file (callee), using a src pattern applying to the included file may be inappropriate if it's the caller's responsibility. Add mainfile prefix to check the main filename. For the example below, the issue may reside in a.c (foo should not be called with a misaligned pointer or foo should switch to an unaligned load), but with src we can only apply to the innocent callee a.h. With this patch we can use the more appropriate mainfile:a.c. //--- a.h // internal linkage static inline int load(int *x) { return *x; } //--- a.c, -fsanitize=alignment #include "a.h" int foo(void *x) { return load(x); } See the updated clang/docs/SanitizerSpecialCaseList.rst for a caveat due to C++ vague linkage functions. Reviewed By: #sanitizers, kstoimenov, vitalybuka Differential Revision: https://reviews.llvm.org/D129832 | 3 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[OpenCL] Turn global vector into static array. NFCI. | 4 年前 | |
[OpenMP] Initial parsing and semantic support for 'parallel masked taskloop simd' construct This patch gives basic parsing and semantic support for "parallel masked taskloop simd" construct introduced in OpenMP 5.1 (section 2.16.10) Differential Revision: https://reviews.llvm.org/D128946 | 3 年前 | |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636 | 7 年前 | |
[clang] Replace report_fatal_error(std::string) uses with report_fatal_error(Twine) As described on D111049, we're trying to remove the <string> dependency from error handling and replace uses of report_fatal_error(const std::string&) with the Twine() variant which can be forward declared. | 4 年前 | |
Reland 9f3fdb0d7fab: [Driver] Use VFS to check if sanitizer blacklists exist With updates to various LLVM tools that use SpecialCastList. It was tempting to use RealFileSystem as the default, but that makes it too easy to accidentally forget passing VFS in clang code. | 6 年前 | |
[clang-cl][sanitizer] Add -fsanitize-address-use-after-return to clang. Also: - add driver test (fsanitize-use-after-return.c) - add basic IR test (asan-use-after-return.cpp) - (NFC) cleaned up logic for generating table of __asan_stack_malloc depending on flag. for issue: https://github.com/google/sanitizers/issues/1394 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D104076 | 4 年前 | |
Use value instead of getValue (NFC) | 3 年前 | |
Revert "[clang] Emit SARIF Diagnostics: Create clang::SarifDocumentWriter interface" This reverts commit 6546fdbe36fd1227d7f23f89fd9a9825813b3de9. This broke some build bots due to a layering issue: https://lab.llvm.org/buildbot/#/builders/57/builds/19244 | 3 年前 | |
[Basic] SourceManager docs: macro expansion SLocs aren't a single token. NFC And haven't been since 2011: https://github.com/llvm/llvm-project/commit/eeca36fe9ad767380b2eab76a6fe5ba410a47393 | 4 年前 | |
[msvc] Add necessary #include to make compiler intrinsics available. llvm-svn: 369944 | 6 年前 | |
[clang] Don't use Optional::getValue (NFC) | 3 年前 | |
[PS4/PS5] NFC: Use preferred predicate in a triple check Also add a test to verify this difference in the PS4/PS5 ABIs, now that we have identified it. | 3 年前 | |
[PS5] Add PS5OSTargetInfo class, update affected tests | 4 年前 | |
De-templatize non-dependent VS macro logic, NFC These macro definitions don't depend on the template parameter, so they don't need to be part of the template. Move them to a .cpp file. llvm-svn: 365556 | 6 年前 | |
[Pseudo] Token/TokenStream, PP directive parser. The TokenStream class is the representation of the source code that will be fed into the GLR parser. This patch allows a "raw" TokenStream to be built by reading source code. It also supports scanning a TokenStream to find the directive structure. Next steps (with placeholders in the code): heuristically choosing a path through #ifs, preprocessing the code by stripping directives and comments. These will produce a suitable stream to feed into the parser proper. Differential Revision: https://reviews.llvm.org/D119162 | 4 年前 | |
[clang][NFC] Generate the {Type,ArrayType,UnaryExprOrType,Expression}Traits... ...enumerations from TokenKinds.def and use the new macros from TokenKinds.def to remove the hard-coded lists of traits. All the information needed to generate these enumerations is already present in TokenKinds.def. The motivation here is to be able to dump the trait spelling without hard-coding the list in yet another place. Note that this change the order of the enumerators in the enumerations (except that in the TypeTrait enumeration all unary type traits are before all binary type traits, and all binary type traits are before all n-ary type traits). Apart from the aforementioned ordering which is relied upon, after this patch no code in clang or in the various clang tools depend on the specific ordering of the enumerators. No functional changes intended. Differential Revision: https://reviews.llvm.org/D81455 Reviewed By: aaron.ballman | 5 年前 | |
[NFC][clang] Return underlying strings directly instead of OS.str() This avoids an unnecessary copy required by 'return OS.str()', allowing instead for NRVO or implicit move. The .str() call (which flushes the stream) is no longer required since 65b13610a5226b84889b923bae884ba395ad084d, which made raw_string_ostream unbuffered by default. Differential Revision: https://reviews.llvm.org/D115374 | 4 年前 | |
[Sema] Special case -Werror-implicit-function-declaration and reject other -Werror- This is the only -Werror- form warning option GCC supports (gcc/c-family/c.opt). Fortunately no other form is used anywhere. | 5 年前 | |
[clang][cli] Generate and round-trip CodeGen options This patch implements generation of remaining codegen options and tests it by performing parse-generate-parse round trip. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D96056 | 5 年前 | |
Avoid including FileManager.h from SourceManager.h Most clients of SourceManager.h need to do things like turning source locations into file & line number pairs, but this doesn't require bringing in FileManager.h and LLVM's FS headers. The main code change here is to sink SM::createFileID into the cpp file. I reason that this is not performance critical because it doesn't happen on the diagnostic path, it happens along the paths of macro expansion (could be hot) and new includes (less hot). Saves some includes: 309 - /usr/local/google/home/rnk/llvm-project/clang/include/clang/Basic/FileManager.h 272 - /usr/local/google/home/rnk/llvm-project/clang/include/clang/Basic/FileSystemOptions.h 271 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/Support/VirtualFileSystem.h 267 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/Support/FileSystem.h 266 - /usr/local/google/home/rnk/llvm-project/llvm/include/llvm/Support/Chrono.h Differential Revision: https://reviews.llvm.org/D75406 | 6 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 7 年前 | ||
| 5 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 7 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 7 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 5 年前 | ||
| 6 年前 |