| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Fix build error in StmtPrinterTest.cpp (cherry picked from commit c933453858307d060a1b79e257feb99c9ac828d7) | 3 年前 | |
Revert "[clang] Pass FoundDecl to DeclRefExpr creator for operator overloads" This reverts commit 4e94f6653150511de434fa7e29b684ae7f0e52b6. See https://reviews.llvm.org/D129973#3698969 for reasoning. (cherry picked from commit df48e3fbcc8be1f4c04bd97517d12e662f54de75) | 3 年前 | |
[clang][dataflow] Analyze calls to in-TU functions This patch adds initial support for context-sensitive analysis of simple functions whose definition is available in the translation unit, guarded by the ContextSensitive flag in the new TransferOptions struct. When this option is true, the VisitCallExpr case in the builtin transfer function has a fallthrough case which checks for a direct callee with a body. In that case, it constructs a CFG from that callee body, uses the new pushCall method on the Environment to make an environment to analyze the callee, and then calls runDataflowAnalysis with a NoopAnalysis (disabling context-sensitive analysis on that sub-analysis, to avoid problems with recursion). After the sub-analysis completes, the Environment from its exit block is simply assigned back to the environment at the callsite. The pushCall method (which currently only supports non-method functions with some restrictions) maps the SourceLocations for all the parameters to the existing source locations for the corresponding arguments from the callsite. This patch adds a few tests to check that this context-sensitive analysis works on simple functions. More sophisticated functionality will be added later; the most important next step is to explicitly model context in some fields of the DataflowAnalysisContext class, as mentioned in a FIXME comment in the pushCall implementation. Reviewed By: ymandel, xazax.hun Differential Revision: https://reviews.llvm.org/D130306 | 3 年前 | |
Use value instead of getValue (NFC) | 3 年前 | |
[CGDebugInfo] Access the current working directory from the VFS ...instead of calling llvm::sys::fs::current_path() directly. Differential Revision: https://reviews.llvm.org/D130443 | 3 年前 | |
[analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file This error was found when analyzing MySQL with CTU enabled. When there are space characters in the lookup name, the current delimiter searching strategy will make the file path wrongly parsed. And when two lookup names have the same prefix before their first space characters, a 'multiple definitions' error will be wrongly reported. e.g. The lookup names for the two lambda exprs in the test case are c:@S@G@F@G#@Sa@F@operator int (*)(char)#1 and c:@S@G@F@G#@Sa@F@operator bool (*)(char)#1 respectively. And their prefixes are both c:@S@G@F@G#@Sa@F@operator when using the first space character as the delimiter. Solving the problem by adding a length for the lookup name, making the index items in the format of <USR-Length>:<USR File> <Path>. --- In the test case of this patch, we found that it will trigger a "triple mismatch" warning when using clang -cc1 to analyze the source file with CTU using the on-demand-parsing strategy in Darwin systems. And this problem is also encountered in D75665, which is the patch introducing the on-demand parsing strategy. We temporarily bypass this problem by using the loading-ast-file strategy. Refer to the [discourse topic](https://discourse.llvm.org/t/60762) for more details. Differential Revision: https://reviews.llvm.org/D102669 | 4 年前 | |
[clang] Use value instead of getValue (NFC) | 3 年前 | |
[clang][driver] Remove dynamic gcc-toolset/devtoolset logic This breaks when the newest available devtoolset directory is not a complete toolset: https://github.com/llvm/llvm-project/issues/57843 Remove this again in favor or just adding the two new directories for devtoolset/gcc-toolset 12. This reverts commit 35aaf548237a4f213ba9d95de53b33c5ce1eadce. This reverts commit 9f97720268911abae2ad9d90e270358db234a1c1. Fixes https://github.com/llvm/llvm-project/issues/57843 Differential Revision: https://reviews.llvm.org/D136435 | 3 年前 | |
[clang-format] Distinguish logical and after bracket from reference Fix commit b646f0955574 and remove redundant code. Differential Revision: https://reviews.llvm.org/D131750 (cherry picked from commit ef71383b0cfbacdbebf495015f6ead5294bf7759) | 3 年前 | |
[CGDebugInfo] Access the current working directory from the VFS ...instead of calling llvm::sys::fs::current_path() directly. Differential Revision: https://reviews.llvm.org/D130443 | 3 年前 | |
[clang] Visit enum base specifiers in libIndex Fixes https://github.com/clangd/clangd/issues/878. Differential Revision: https://reviews.llvm.org/D111260 | 4 年前 | |
[test] Fix leak in test | 3 年前 | |
Revert "[clang] Implement ElaboratedType sugaring for types written bare" This reverts commit 7c51f02effdbd0d5e12bfd26f9c3b2ab5687c93f because it stills breaks the LLDB tests. This was re-landed without addressing the issue or even agreement on how to address the issue. More details and discussion in https://reviews.llvm.org/D112374. | 3 年前 | |
[clang] Use value instead of getValue (NFC) | 3 年前 | |
Bump googletest to 1.10.0 | 5 年前 | |
[Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug I'd like to add these comments to warn others of problems I encountered when trying to use RemoveLineIfEmpty. I originally tried to fix the problem, but I realized I could implement the functionality more easily and efficiently in my calling code where I can make the simplifying assumption that there are no prior edits to the line from which text is being removed. While I've lost the motivation to write a fix, which doesn't look easy, I figure a warning to others is better than silence. I've added a unit test to demonstrate the problem. I don't know how to mark it as an expected failure, so I just marked it disabled. Reviewed By: jkorous Differential Revision: https://reviews.llvm.org/D61466 llvm-svn: 369049 | 6 年前 | |
Revert "[clang] Implement ElaboratedType sugaring for types written bare" This reverts commit 7c51f02effdbd0d5e12bfd26f9c3b2ab5687c93f because it stills breaks the LLDB tests. This was re-landed without addressing the issue or even agreement on how to address the issue. More details and discussion in https://reviews.llvm.org/D112374. | 3 年前 | |
[Serialization] Add missing includes for CHAR_BIT | 4 年前 | |
Revert "[clang] Implement ElaboratedType sugaring for types written bare" This reverts commit 7c51f02effdbd0d5e12bfd26f9c3b2ab5687c93f because it stills breaks the LLDB tests. This was re-landed without addressing the issue or even agreement on how to address the issue. More details and discussion in https://reviews.llvm.org/D112374. | 3 年前 | |
[Syntax] Fix macro-arg handling in TokenBuffer::spelledForExpanded A few cases were not handled correctly. Notably: #define ID(X) X #define HIDE a ID(b) HIDE spelledForExpanded() would claim HIDE is an equivalent range of the 'b' it contains, despite the fact that HIDE also covers 'a'. While trying to fix this bug, I found findCommonRangeForMacroArgs hard to understand (both the implementation and how it's used in spelledForExpanded). It relies on details of the SourceLocation graph that are IMO fairly obscure. So I've added/revised quite a lot of comments and made some naming tweaks. Fixes https://github.com/clangd/clangd/issues/1289 Differential Revision: https://reviews.llvm.org/D134618 (cherry picked from commit 67268ee11c220b1dfdf84afb10a12371c5ae6400) | 3 年前 | |
[libclang] Add CXRewriter to libclang API Differential Revision: https://reviews.llvm.org/D86992 | 5 年前 | |
[clang-repl] Recommit "Land initial infrastructure for incremental parsing" Original commit message: In http://lists.llvm.org/pipermail/llvm-dev/2020-July/143257.html we have mentioned our plans to make some of the incremental compilation facilities available in llvm mainline. This patch proposes a minimal version of a repl, clang-repl, which enables interpreter-like interaction for C++. For instance: ./bin/clang-repl clang-repl> int i = 42; clang-repl> extern "C" int printf(const char*,...); clang-repl> auto r1 = printf("i=%d\n", i); i=42 clang-repl> quit The patch allows very limited functionality, for example, it crashes on invalid C++. The design of the proposed patch follows closely the design of cling. The idea is to gather feedback and gradually evolve both clang-repl and cling to what the community agrees upon. The IncrementalParser class is responsible for driving the clang parser and codegen and allows the compiler infrastructure to process more than one input. Every input adds to the “ever-growing” translation unit. That model is enabled by an IncrementalAction which prevents teardown when HandleTranslationUnit. The IncrementalExecutor class hides some of the underlying implementation details of the concrete JIT infrastructure. It exposes the minimal set of functionality required by our incremental compiler/interpreter. The Transaction class keeps track of the AST and the LLVM IR for each incremental input. That tracking information will be later used to implement error recovery. The Interpreter class orchestrates the IncrementalParser and the IncrementalExecutor to model interpreter-like behavior. It provides the public API which can be used (in future) when using the interpreter library. Differential revision: https://reviews.llvm.org/D96033 | 5 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 5 年前 | ||
| 6 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 5 年前 | ||
| 5 年前 |