| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[Tooling/DependencyScanning] Rename refactorings towards transitioning dependency scanning to use pre-lexed preprocessor directive tokens This is first of a series of patches for making the special lexing for dependency scanning a first-class feature of the Preprocessor and Lexer. This patch only includes NFC renaming changes to make reviewing of the functionality changing parts easier. Differential Revision: https://reviews.llvm.org/D125484 | 4 年前 | |
[clang] Use value instead of getValue (NFC) | 3 年前 | |
[clang][lex] Remark on search path usage For dependency scanning, it would be useful to collect header search paths (provided on command-line via -I and friends) that were actually used during preprocessing. This patch adds that feature to HeaderSearch along with a new remark that reports such paths as they get used. Previous version of this patch tried to use the existing LookupFileCache to report used paths via HitIdx. That doesn't work for ComputeUserEntryUsage (which is intended to be called *after* preprocessing), because it indexes used search paths by the file name. This means the values get overwritten when the code contains #include_next. Note that HeaderSearch doesn't use HeaderSearchOptions::UserEntries directly. Instead, InitHeaderSearch pre-processes them (adds platform-specific paths, removes duplicates, removes paths that don't exist) and creates DirectoryLookup instances. This means we need a mechanism for translating between those two. It's not possible to go from DirectoryLookup back to the original HeaderSearch, so InitHeaderSearch now tracks the relationships explicitly. Depends on D111557. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D102923 | 4 年前 | |
Don't use Optional::hasValue (NFC) | 3 年前 | |
[PS5] Add basic PS5 driver behavior This adds a PS5-specific ToolChain subclass, which defines some basic PS5 driver behavior. Future patches will add more target-specific driver behavior. | 4 年前 | |
[Clang] Add support for Unicode identifiers (UAX31) in C2x mode. This implements N2836 Identifier Syntax using Unicode Standard Annex 31. The feature was already implemented for C++, and the semantics are the same. Unlike C++ there was, afaict, no decision to backport the feature in older languages mode, so C17 and earlier are not modified and the code point tables for these language modes are conserved. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D130416 | 3 年前 | |
[Clang] Adjust extension warnings for delimited sequences WG21 approved delimited escape sequences and named escape sequences. Adjust the extension warnings accordingly, and update the release notes. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D129664 | 3 年前 | |
Remove cache for macro arg stringization Summary: The cache recorded the wrong expansion location for all but the first stringization. It seems uncommon to stringize the same macro argument multiple times, so this cache doesn't seem that important. Fixes PR39942 Reviewers: vsk, rsmith Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65428 llvm-svn: 367337 | 6 年前 | |
[clang] Use value instead of getValue (NFC) | 3 年前 | |
Use any_of (NFC) | 3 年前 | |
[clang] Introduce SourceLocation::[U]IntTy typedefs. This is part of a patch series working towards the ability to make SourceLocation into a 64-bit type to handle larger translation units. NFC: this patch introduces typedefs for the integer type used by SourceLocation and makes all the boring changes to use the typedefs everywhere, but for the moment, they are unconditionally defined to uint32_t. Patch originally by Mikhail Maltsev. Reviewed By: tmatheson Differential Revision: https://reviews.llvm.org/D105492 | 4 年前 | |
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 年前 | |
Add support for #elifdef and #elifndef WG14 adopted N2645 and WG21 EWG has accepted P2334 in principle (still subject to full EWG vote + CWG review + plenary vote), which add support for #elifdef as shorthand for #elif defined and #elifndef as shorthand for #elif !defined. This patch adds support for the new preprocessor directives. | 5 年前 | |
[Clang] Adjust extension warnings for #warning The #warning directive is standard in C++2b and C2x, this adjusts the pedantic and extensions warning accordingly. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D130415 | 3 年前 | |
[clang][preprocessor] Fix unsigned-ness of utf8 char literals UTF8 char literals are always unsigned. Fixes https://github.com/llvm/llvm-project/issues/54886 Differential Revision: https://reviews.llvm.org/D124996 | 4 年前 | |
[Lex] Introduce PPCallbacks::LexedFileChanged() preprocessor callback This is a preprocessor callback focused on the lexed file changing, without conflating effects of line number directives and other pragmas. A client that only cares about what files the lexer processes, like dependency generation, can use this more straightforward callback instead of PPCallbacks::FileChanged(). Clients that want the pragma directive effects as well can keep using FileChanged(). A use case where PPCallbacks::LexedFileChanged() is particularly simpler to use than FileChanged() is in a situation where a client wants to keep track of lexed file changes that include changes from/to the predefines buffer, where it becomes unnecessary complicated trying to use FileChanged() while filtering out the pragma directives effects callbacks. Also take the opportunity to provide information about the prior FileID the Lexer moved from, even when entering a new file. Differential Revision: https://reviews.llvm.org/D128947 | 3 年前 | |
[clang] Add __is_target_variant_{os,environment} builtins Xcode 13's clang has them. For the included testcase, Xcode's clang behaves like the implementation in this patch. Availability.h in the macOS 12.0 SDK (part of Xcode 13, and the current stable version of the macOS SDK) does something like: #if defined(__has_builtin) ... #if __has_builtin(__is_target_os) #if __has_builtin(__is_target_environment) #if __has_builtin(__is_target_variant_os) #if __has_builtin(__is_target_variant_environment) #if (... && ((__is_target_os(ios) && __is_target_environment(macabi)) || (__is_target_variant_os(ios) && __is_target_variant_environment(macabi)))) #define __OSX_AVAILABLE_STARTING(_osx, _ios) ... #define __OSX_AVAILABLE_BUT_DEPRECATED(_osxIntro, _osxDep, _iosIntro, _iosDep) ... #define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(_osxIntro, _osxDep, _iosIntro, _iosDep, _msg) ... So if __has_builtin(__is_target_variant_os) or __has_builtin(__is_target_variant_environment) are false, these defines are not defined. Most of the time, this doesn't matter. But open-source clang currently fails to commpile a file containing only #include <Security/cssmtype.h> when building for catalyst by adding a -target arm64-apple-ios13.1-macabi triple, due to those __OSX_AVAILABLE macros not being set correctly. If a potential future SDK version were to include cssmtype.h transitively from a common header such as <Foundation/Foundation.h>, then it would become close to impossible to build Catalyst binaries with open-source clang. To fix this for normal catalyst builds, it's only necessary that __has_builtin() evaluates to true for these two built-ins -- the implementation of them doesn't matter. But as a courtesy, a correct (at least on the test cases I tried) implementation is provided. (This should also help people who try to build zippered code, where having the correct implementation does matter.) Differential Revision: https://reviews.llvm.org/D132754 | 3 年前 | |
[NFC][Clang][Pragma] Remove unused variables Reviewed By: beanz Differential Revision: https://reviews.llvm.org/D124339 | 4 年前 | |
[clang] Use value instead of getValue (NFC) | 3 年前 | |
[C++20][Modules] Implement include translation. This addresses [cpp.include]/7 (when encountering #include header-name) If the header identified by the header-name denotes an importable header, it is implementation-defined whether the #include preprocessing directive is instead replaced by an import directive. In this implementation, include translation is performed _only_ for headers in the Global Module fragment, so: module; #include "will-be-translated.h" // IFF the header unit is available. export module M; #include "will-not-be-translated.h" // even if the header unit is available The reasoning is that, in general, includes in the module purview would not be validly translatable (they would have to immediately follow the module decl and without any other intervening decls). Otherwise that would violate the rules on contiguous import directives. This would be quite complex to track in the preprocessor, and for relatively little gain (the user can 'import "will-not-be-translated.h";' instead.) TODO: This is one area where it becomes increasingly difficult to disambiguate clang modules in C++ from C++ standard modules. That needs to be addressed in both the driver and the FE. Differential Revision: https://reviews.llvm.org/D128981 | 3 年前 | |
[clang][lex] NFC: Use FileEntryRef in PreprocessorLexer::getFileEntry() This patch changes the return type of PreprocessorLexer::getFileEntry() so that its clients may stop using the deprecated APIs of FileEntry. Reviewed By: bnbarham Differential Revision: https://reviews.llvm.org/D123772 | 4 年前 | |
SourceManager: Make LastLineNoContentCache and ContentCache::SourceLineCache mutable, NFC Avoid some noisy const_casts by making ContentCache::SourceLineCache and SourceManager::LastLineNoContentCache both mutable. Differential Revision: https://reviews.llvm.org/D89914 | 5 年前 | |
C++2a -> C++20 in some identifiers; NFC. | 6 年前 | |
[clang] Don't use Optional::hasValue (NFC) | 3 年前 | |
Support Unicode 14 identifiers This update the UAX tables to support new Unicode 14 identifiers. | 4 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 4 年前 |