[PATCH] D36642: [Lexer] Report more precise skipped regions (PR34166)

2017-09-11 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. Thanks, LGTM https://reviews.llvm.org/D36642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D37642: [pp-trace] Update skipped source ranges in tests

2017-09-11 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D37642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D37681: [refactor] Simplify the interface and remove some template magic

2017-09-11 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Herald added a subscriber: mgorny. This patch tries to simplify the interface for the refactoring action rules and refactoring requirements. It merges the selection constraints and selection requirements into one class. The refactoring actions rules must now be i

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-11 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. @klimek I've added a patch that simplifies the interface and the template code - https://reviews.llvm.org/D37681. Hopefully you'll find that the code there is cleaner. Repository: rL LLVM https://reviews.llvm.org/D36574 __

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-12 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313025: [refactor] add a refactoring action rule that returns symbol occurrences (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D36574?vs=114309&id=114806#toc Repository: r

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman reopened this revision. arphaman added a comment. This revision is now accepted and ready to land. Oops, I've put in the wrong diff link for r313025. This patch is still not committed. Repository: rL LLVM https://reviews.llvm.org/D36574 ___

[PATCH] D37210: [refactor] add a refactoring action rule that returns symbol occurrences

2017-09-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman closed this revision. arphaman added a comment. Committed in r313025 Repository: rL LLVM https://reviews.llvm.org/D37210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked 8 inline comments as done. arphaman added inline comments. Comment at: tools/clang-refactor/TestSupport.h:32 + +namespace refactor { + hokein wrote: > Do you plan to use `refactor` on other files? Probably in the future, yeah. Repository: rL

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Yeah, I accidentally committed a prior patch with the link to this diff. I will commit this patch today though so it should be updated. Repository: rL LLVM https://reviews.llvm.org/D36574 ___ cfe-commits mailing list cf

[PATCH] D36574: [refactor] add clang-refactor tool with initial testing support and local-rename action

2017-09-14 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313244: [refactor] add clang-refactor tool with initial testing support and (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D36574?vs=114806&id=115191#toc Repository: rL LLV

[PATCH] D37618: Use CommonOptionsParser in clang-refactor

2017-09-14 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313260: [refactor] Use CommonOptionsParser in clang-refactor (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D37618?vs=114328&id=115208#toc Repository: rL LLVM https://revi

[PATCH] D37681: [refactor] Simplify the interface and remove some template magic

2017-09-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 115211. arphaman marked 2 inline comments as done. arphaman added a comment. Make methods private Repository: rL LLVM https://reviews.llvm.org/D37681 Files: include/clang/Tooling/Refactoring/RefactoringActionRule.h include/clang/Tooling/Refactoring/

[PATCH] D37856: [refactor] add support for refactoring options

2017-09-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This patch adds initial support for refactoring options. One can now use optional and required `std::string` options. The options are implemented in the following manner: - A base interface `RefactoringOption` declares methods that describe the option's name, de

[PATCH] D37544: [ubsan] Skip alignment checks which are folded away

2017-09-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. It looks like this test passes prior to the code change in this patch. Can you please change the test? https://reviews.llvm.org/D37544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D37542: [ubsan] Save a ptrtoint when emitting alignment checks

2017-09-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. Nice, LGTM https://reviews.llvm.org/D37542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D37976: [docs][refactor] add refactoring engine design documentation

2017-09-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This patch adds a refactoring engine design document that talks about the design and provides several example of how the engine can be used. Repository: rL LLVM https://reviews.llvm.org/D37976 Files: docs/RefactoringEngine.rst docs/index.rst Index: docs/

[PATCH] D37544: [ubsan] Skip alignment checks which are folded away

2017-09-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. This one passes for me too without the code change. https://reviews.llvm.org/D37544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D38081: Set completion priority of destructors and operators to CCP_Unlikely.

2017-09-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. Nice, LGTM Please keep in mind that LLVM follows a weekly ping rate: https://llvm.org/docs/DeveloperPolicy.html#code-reviews . Comment at: lib/Sema/SemaCodeComplete.cpp

[PATCH] D37544: [ubsan] Skip alignment checks which are folded away

2017-09-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D37544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/c

[PATCH] D55463: Introduce a source minimizer that reduces source to directives that might affect the dependency list for a compilation

2019-06-03 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL362459: Add clang source minimizer that reduces source to directives (authored by arphaman, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D60233: [clang-scan-deps] initial outline of the tool that runs preprocessor to find dependencies over a JSON compilation database

2019-06-04 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 203012. arphaman marked 7 inline comments as done. arphaman added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60233/new/ https://reviews.llvm.org/D60233 Files: clang/test/ClangScanDeps/Inputs/regular_cdb.jso

[PATCH] D60233: [clang-scan-deps] initial outline of the tool that runs preprocessor to find dependencies over a JSON compilation database

2019-06-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 203887. arphaman marked 3 inline comments as done. arphaman added a comment. - Add test for `-j2` to exercise multi threading. - Add `InitLLVM`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60233/new/ https://reviews.llvm.org/D60233 Files: clan

[PATCH] D60233: [clang-scan-deps] initial outline of the tool that runs preprocessor to find dependencies over a JSON compilation database

2019-06-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang/test/ClangScanDeps/Inputs/regular_cdb.json:4 + "directory": "DIR", + "command": "clang -c DIR/regular_cdb.cpp -IInputs -MD -MF DIR/regular_cdb.d", + "file": "DIR/regular_cdb.cpp" aganea wrote: > Is `-MD -MF` re

[PATCH] D63101: [Frontend] SetUpDiagnosticLog should handle unowned diagnostic consumer in the compiler

2019-06-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a subscriber: cfe-commits. arphaman added a comment. + cue-commits CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63101/new/ https://reviews.llvm.org/D63101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[PATCH] D63101: [Frontend] SetUpDiagnosticLog should handle unowned diagnostic consumer in the compiler

2019-06-10 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363009: [Frontend] SetUpDiagnosticLog should handle unowned diagnostic consumer (authored by arphaman, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

[PATCH] D63176: [SemaObjC] Infer availability of stuff declared in categories from the availability of the enclosing category

2019-06-11 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang/test/SemaObjC/unguarded-availability.m:365 +// FIXME: The pretty-printing for categories sucks. +@interface HasCat () // expected-note 3 {{'' has been marked as being introduced in macOS 10.11 here, but the deployment target is m

[PATCH] D60233: [clang-scan-deps] initial outline of the tool that runs preprocessor to find dependencies over a JSON compilation database

2019-06-12 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363204: [clang-scan-deps] initial outline of the tool that runs preprocessor to find (authored by arphaman, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed p

[PATCH] D60233: [clang-scan-deps] initial outline of the tool that runs preprocessor to find dependencies over a JSON compilation database

2019-06-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked 2 inline comments as done. arphaman added inline comments. Comment at: clang/test/ClangScanDeps/Inputs/regular_cdb.json:4 + "directory": "DIR", + "command": "clang -c DIR/regular_cdb.cpp -IInputs -MD -MF DIR/regular_cdb.d", + "file": "DIR/regular_cdb.cpp" -

[PATCH] D63290: Unify DependencyFileGenerator class and DependencyCollector interface

2019-06-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: Bigcheese, vsapsai, bruno, aganea. Herald added subscribers: dexonsmith, jkorous. Herald added a project: clang. This NFCI patch makes DependencyFileGenerator a DependencyCollector as it was intended when DependencyCollector was introduced

[PATCH] D63290: Unify DependencyFileGenerator class and DependencyCollector interface

2019-06-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 204611. arphaman added a comment. Fix the missing word in the comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63290/new/ https://reviews.llvm.org/D63290 Files: clang/include/clang/Frontend/CompilerInstance.h clang/include/clang/Frontend

[PATCH] D63290: Unify DependencyFileGenerator class and DependencyCollector interface

2019-06-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 205438. arphaman marked 3 inline comments as done. arphaman added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63290/new/ https://reviews.llvm.org/D63290 Files: clang/include/clang/Frontend/CompilerInstance.h

[PATCH] D63290: Unify DependencyFileGenerator class and DependencyCollector interface

2019-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363840: Unify DependencyFileGenerator class and DependencyCollector interface (NFCI) (authored by arphaman, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed p

[PATCH] D63579: [clang-scan-deps] print the dependencies to stdout and remove the need to use -MD options in the CDB

2019-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: Bigcheese, aganea. Herald added subscribers: tschuett, dexonsmith, jkorous. Herald added a project: clang. The gathered dependencies are now printed to the STDOUT instead of being written to disk. The tool also doesn't need the dependency

[PATCH] D63579: [clang-scan-deps] print the dependencies to stdout and remove the need to use -MD options in the CDB

2019-06-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:32 +class DependencyCollectorFactory { +public: aganea wrote: > Do you envision future uses for this factory? Most likely, yes. I don't want to lock-in into creating the

[PATCH] D63579: [clang-scan-deps] print the dependencies to stdout and remove the need to use -MD options in the CDB

2019-06-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 205886. arphaman marked 3 inline comments as done. arphaman added a comment. removed the lock CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63579/new/ https://reviews.llvm.org/D63579 Files: clang/include/clang/Frontend/Utils.h clang/lib/Fronte

[PATCH] D64945: [clang-scan-deps] Dependency directives source minimizer: handle #pragma once

2019-07-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: Bigcheese, dexonsmith. Herald added subscribers: tschuett, jkorous. Herald added a project: clang. We should re-emit `#pragma once` to ensure the preprocessor will still honor when running on minimized sources. Repository: rC Clang ht

[PATCH] D64945: [clang-scan-deps] Dependency directives source minimizer: handle #pragma once

2019-07-18 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. arphaman marked 2 inline comments as done. Closed by commit rL366509: [clang-scan-deps] Dependency directives source minimizer: handle #pragma once (authored by arphaman, committed by ). Herald added a project: LLVM. Herald

[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-07-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 211385. arphaman added a comment. Fix a bug for empty minimized files where null terminator lookup by the lexer was an out of bounds read CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63907/new/ https://reviews.llvm.org/D63907 Files: clang/incl

[PATCH] D55895: NFC: simplify Darwin environment handling

2019-07-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55895/new/ https://reviews.llvm.org/D55895 ___ cfe-commit

[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-07-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 212435. arphaman marked 7 inline comments as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63907/new/ https://reviews.llvm.org/D63907 Files: clang/include/clang/Basic/FileManager.h clang/include/clang/Tooling/Depend

[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-07-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:1 +//===- DependencyScanningFilesystem.h - clang-scan-deps fs ===---*- C++ -*-===// +// aganea wrote: > General comment for this file and t

[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-07-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 212442. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63907/new/ https://reviews.llvm.org/D63907 Files: clang/include/clang/Basic/FileManager.h clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h clang/include/clang/T

[PATCH] D65481: NFCI: Simplify SourceManager::translateFile by removing code path that should never be taken

2019-07-30 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: rsmith, bruno, Bigcheese. Herald added subscribers: dexonsmith, jkorous. Herald added a project: clang. I noticed that `SourceManager::translateFile` has code that doesn't really make sense. In particular, if it fails to find a `FileID` by

[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-08-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp:156 +/// this subclass. +class MinimizedVFSFile final : public llvm::vfs::File { +public: aganea wrote: > This makes only a short-lived objects, is

[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-08-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 213511. arphaman marked 3 inline comments as done. arphaman added a comment. Fix comment typo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63907/new/ https://reviews.llvm.org/D63907 Files: clang/include/clang/Basic/FileManager.h clang/include

[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-08-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 213664. arphaman marked 6 inline comments as done. arphaman added a comment. Address review comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63907/new/ https://reviews.llvm.org/D63907 Files: clang/include/clang/Bas

[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-08-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:117 +std::mutex CacheLock; +llvm::StringMap> Cache; + }; aganea wrote: > Why not use a bump allocator here? (it would be per-thread

[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-08-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Just for reference, this patch still doesn't reuse the FileManager across invocations in a thread. We expect to get even better performance once we reuse it, but I'm going have to improve its API first. Repository: rC Clang CHANGES SINCE LAST ACTION https://revie

[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-08-06 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp:76 +CachedFileSystemEntry +CachedFileSystemEntry::createDirectoryEntry(llvm::vfs::Status Stat) { + assert(Stat.isDirector

[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-08-06 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368086: [clang-scan-deps] Implementation of dependency scanner over minimized sources (authored by arphaman, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D65907: Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations

2019-08-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: rsmith, bruno, Bigcheese, jkorous, harlanhaskins. Herald added subscribers: dexonsmith, mgorny. Herald added a project: clang. This patch introduces a parallel API to FileManager's `getFile`: `getFileEntryRef`, which returns a reference to

[PATCH] D65907: Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations

2019-08-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 214010. arphaman added a comment. Fix a bug with dereferencing `None` File value in one call. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65907/new/ https://reviews.llvm.org/D65907 Files: clang/include/cl

[PATCH] D65907: Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations

2019-08-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman planned changes to this revision. arphaman added a comment. I forgot I left a FIXME that I intended to fix in there, I need to resolve that first. I'll update the patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65907/new/ https://rev

[PATCH] D65907: Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations

2019-08-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 214015. arphaman added a comment. Fix the FIXME. The patch is now ready for review. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65907/new/ https://reviews.llvm.org/D65907 Files: clang/include/clang/Basic/FileManager.h clang/include/clang/Bas

[PATCH] D65906: [clang-scan-deps] Fix edge cases in the minimizer

2019-08-07 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks for figuring out these issues! It looks like you're fixing several edge cases, would you mind splitting the patch up for easier review? Regarding the invisible characters before `#ifdef`, are you sure that's the right behavior? If you run the preprocessor over y

[PATCH] D65986: Allow setting the VFS to 'real' mode instead of default 'physical'

2019-08-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang/lib/Driver/Driver.cpp:167 +else + Diag(diag::err_drv_unsupported_option_argument) << OptionPrefix << Value; + } It might be nice to `break` here to exit early, unless you want to make Clang pick the las

[PATCH] D65906: [clang-scan-deps] Fix edge cases in the minimizer

2019-08-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. @aganea These are not just any invisible characters that you have, this is the UTF8 BOM. Clang's Lexer skips over them if they're in the beginning of the file (`Lexer::InitLexer`). The minimizer should do the same thing, so ideally you would factor out the BOM detectio

[PATCH] D65989: [clang-scan-deps] Add minimizer support for C++20 modules.

2019-08-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65989/new/ https://reviews.llvm.org/D65989 ___ cfe-commit

[PATCH] D65989: [clang-scan-deps] Add minimizer support for C++20 modules.

2019-08-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: unittests/Lex/DependencyDirectivesSourceMinimizerTest.cpp:577 +TEST(MinimizeSourceToDependencyDirectivesTest, CxxModules) { +SmallVector Out; +SmallVector Tokens; Looks like it's not indented according to clang-

[PATCH] D65878: [Refactor] Moving SourceExtraction header from lib to include

2019-08-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65878/new/ https://reviews.llvm.org/D65878 ___

[PATCH] D65907: Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations

2019-08-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang/include/clang/Basic/FileManager.h:110 +/// A reference to a \c FileEntry that includes the name of the file as it was +/// accessed by the FileManager's client. +class FileEntryRef { bruno wrote: > How does that w

[PATCH] D65907: Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations

2019-08-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 215718. arphaman marked 8 inline comments as done. arphaman added a comment. Address review comments and proper `use-external-names` support. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65907/new/ https://reviews.llvm.org/

[PATCH] D65907: Introduce FileEntryRef and use it when handling includes to report correct dependencies when the FileManager is reused across invocations

2019-08-16 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 215719. arphaman added a comment. remove accidentally include diff's `.rej` file. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65907/new/ https://reviews.llvm.org/D65907 Files: clang/include/clang/Basic/FileManager.h clang/include/clang/Basic

[PATCH] D63579: [clang-scan-deps] print the dependencies to stdout and remove the need to use -MD options in the CDB

2019-06-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added inline comments. Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:32 +class DependencyCollectorFactory { +public: aganea wrote: > arphaman wrote: > > aganea wrote: > > > Do you envision future u

[PATCH] D63579: [clang-scan-deps] print the dependencies to stdout and remove the need to use -MD options in the CDB

2019-06-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 205938. arphaman added a comment. Use the shared stream as suggested. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63579/new/ https://reviews.llvm.org/D63579 Files: clang/include/clang/Frontend/Utils.h clang/lib/Frontend/DependencyFile.cpp

[PATCH] D63579: [clang-scan-deps] print the dependencies to stdout and remove the need to use -MD options in the CDB

2019-06-21 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364088: [clang-scan-deps] print the dependencies to stdout (authored by arphaman, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://

[PATCH] D63681: [clang-scan-deps] Introduce the DependencyScanning library with the thread worker code and better error handling

2019-06-21 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: Bigcheese, aganea. Herald added subscribers: tschuett, dexonsmith, jkorous, mgorny. Herald added a project: clang. This patch extracts out the code that will powers the fast scanning worker into a new file in a new DependencyScanning libra

[PATCH] D63681: [clang-scan-deps] Introduce the DependencyScanning library with the thread worker code and better error handling

2019-06-26 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h:29 +/// sources either using a fast mode where the source files are minimized, or +/// using the regular processing ru

[PATCH] D63681: [clang-scan-deps] Introduce the DependencyScanning library with the thread worker code and better error handling

2019-06-26 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. @aganea The FS `status` and most of file reads will be cached with the shared FS. Hopefully I can put up a patch for it this week. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63681/new/ https://reviews.llvm.org/D63681 _

[PATCH] D63681: [clang-scan-deps] Introduce the DependencyScanning library with the thread worker code and better error handling

2019-06-26 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364474: [clang-scan-deps] Introduce the DependencyScanning library with the (authored by arphaman, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to c

[PATCH] D63907: [clang-scan-deps] Implementation of dependency scanner over minimized sources

2019-06-27 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: Bigcheese, aganea. Herald added subscribers: tschuett, dexonsmith, jkorous, mgorny. Herald added a project: clang. This patch implements the fast dependency scanning mode in `clang-scan-deps`: the preprocessing is done on files that are mi

[PATCH] D63961: [clangd][xpc] pass it LSP value using data instead of string

2019-06-28 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added a reviewer: jkorous. Herald added subscribers: kadircet, dexonsmith, MaskRay, ilya-biryukov. Herald added a project: clang. Use XPC's data type instead of string to pass the LSP value from Clangd. This will make it easier to use from sourcekit-lsp (

[PATCH] D63961: [clangd][xpc] pass the LSP value using data instead of string

2019-06-28 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 207164. arphaman added a comment. Added missing `xpc_release` in the test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63961/new/ https://reviews.llvm.org/D63961 Files: clang-tools-extra/clangd/unittests/xpc/ConversionTests.cpp clang-tools-e

[PATCH] D64149: [clang-scan-deps] use `-Wno-error` when scanning for dependencies

2019-07-03 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added a reviewer: Bigcheese. Herald added subscribers: tschuett, dexonsmith, jkorous. Herald added a project: clang. Warning can be promoted to errors. But that shouldn't prevent us from getting the dependencies! Repository: rC Clang https://reviews.l

[PATCH] D64149: [clang-scan-deps] use `-Wno-error` when scanning for dependencies

2019-07-03 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365065: [clang-scan-deps] use `-Wno-error` when scanning for dependencies (authored by arphaman, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to com

[PATCH] D64525: [clang-scan-deps] Dependency directives source minimizer: single quotes are not digit separators after a valid character literal prefix

2019-07-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added a reviewer: Bigcheese. Herald added subscribers: tschuett, dexonsmith, jkorous. Herald added a project: clang. The single quote character can act as a c++ digit separator. However, the minimizer shouldn't treat it as such when it's actually following

[PATCH] D64525: [clang-scan-deps] Dependency directives source minimizer: single quotes are not digit separators after a valid character literal prefix

2019-07-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added inline comments. Comment at: clang/lib/Lex/DependencyDirectivesSourceMinimizer.cpp:265-272 + // Make sure that the L, u, U, u8 prefixes don't get marked as a + // separator though. + char Prev = *(Cur - 1); + if (Prev

[PATCH] D64525: [clang-scan-deps] Dependency directives source minimizer: single quotes are not digit separators after a valid character literal prefix

2019-07-10 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added inline comments. Comment at: clang/lib/Lex/DependencyDirectivesSourceMinimizer.cpp:270 +return false; + if (Prev == '8' && (Cur - 1 != Start) && *(Cur - 2) == 'u') +return false; Bigcheese wrote:

[PATCH] D64525: [clang-scan-deps] Dependency directives source minimizer: single quotes are not digit separators after a valid character literal prefix

2019-07-10 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365700: [clang-scan-deps] Dependency directives source minimizer: (authored by arphaman, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: h

[PATCH] D55463: Introduce a source minimizer that reduces source to directives that might affect the dependency list for a compilation

2019-05-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 200371. arphaman marked 8 inline comments as done. arphaman added a comment. - Added diagnostic support. - Fixed the issue with C++14 number separators. - Other fixes requested by @Bigcheese . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55463/new/

[PATCH] D55463: Introduce a source minimizer that reduces source to directives that might affect the dependency list for a compilation

2019-05-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Lex/DependencyDirectivesSourceMinimizer.h:36 + pp_import, + pp_at_import, + pp_pragma_import, Bigcheese wrote: > Is `@import` actually a preprocessor directive? For C++20 modules all the > modules bits

[PATCH] D55463: Introduce a source minimizer that reduces source to directives that might affect the dependency list for a compilation

2019-05-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 200376. arphaman added a comment. Remove some outdated commented out code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55463/new/ https://reviews.llvm.org/D55463 Files: clang/include/clang/Basic/DiagnosticLexKinds.td clang/include/clang/Driv

[PATCH] D61707: [Preprocessor] Fix crash emitting note with framework location for "file not found" error.

2019-05-22 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:821 CurDir = nullptr; + bool HasBeenMapped = false; NIT: It looks like `HasBeenMapped` should be always set when `CacheLookup.MappedName` is set as well. Would it make sense to chec

[PATCH] D61707: [Preprocessor] Fix crash emitting note with framework location for "file not found" error.

2019-05-24 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61707/new/ https://reviews.llvm.org/D61707 ___ cfe-commits mailing list cfe-commi

[PATCH] D62271: [Driver] Fix -working-directory issues

2019-05-28 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62271/new/ https://reviews.llvm.org/D62271 ___ cfe-commi

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: steven_wu, ab, dexonsmith. Herald added subscribers: jkorous, mgorny. This patch is a follow-up to the LLVM SDK Version metadata support: https://reviews.llvm.org/D55612. This patch adds support for reading the `SDKSettings.json` file in

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added inline comments. Comment at: include/clang/Driver/DarwinSDKInfo.h:1 +//===--- DarwinSDKInfo.h - SDK Information parser for darwin *- C++ -*-===// +// steven_wu wrote: > Can this just be in Toolchains/

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-13 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added inline comments. Comment at: include/clang/Driver/DarwinSDKInfo.h:36 +/// SDK has no SDKSettings.json, or a valid \c DarwinSDKInfo otherwise. +Expected> parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS, +

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 178307. arphaman added a comment. Updated to infer deployment target version from SDK versions specified in the JSON file and to allow inferring the SDK version from the SDK path. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked 2 inline comments as done. arphaman added inline comments. Comment at: lib/Driver/ToolChains/Darwin.cpp:2053 +return None; + } + return *SDKInfoOrErr; steven_wu wrote: > We also has this InferredFromSDK when we infer deployment target, which

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 178309. arphaman marked an inline comment as done. arphaman added a comment. Ensure test will pass on non-darwin. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55673/new/ https://reviews.llvm.org/D55673 Files: include/cla

[PATCH] D55731: [darwin][arm64] use the "cyclone" CPU for Darwin even when `-arch` is not specified

2018-12-14 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. arphaman added reviewers: ab, t.p.northover. Herald added subscribers: dexonsmith, jkorous, kristof.beyls, javed.absar. The `-target` option allows the user to specify the build target using LLVM triple. The triple includes the arch, and so the `-arch` option is re

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added inline comments. Comment at: include/clang/Driver/DarwinSDKInfo.h:36 +/// SDK has no SDKSettings.json, or a valid \c DarwinSDKInfo otherwise. +Expected> parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS, +

[PATCH] D55673: [darwin] parse the SDK settings from SDKSettings.json if it exists and pass in the -target-sdk-version to the compiler and backend

2018-12-17 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349380: [darwin] parse the SDK settings from SDKSettings.json if it exists and (authored by arphaman, committed by ). Changed prior to commit: https://reviews.llvm.org/D55673?vs=178309&id=178501#toc Re

[PATCH] D55775: [Driver] Don't override '-march' when using '-arch x86_64h'

2018-12-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55775/new/ https://reviews.llvm.org/D55775 ___ cfe-commits mailing list cfe-commi

[PATCH] D55731: [darwin][arm64] use the "cyclone" CPU for Darwin even when `-arch` is not specified

2018-12-17 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349382: [darwin][arm64] use the "cyclone" CPU for Darwin even when `-arch` (authored by arphaman, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55731/new/

[PATCH] D55895: NFC: simplify Darwin environment handling

2018-12-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. I think we might need to run it past the internal builds to see if anything breaks. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55895/new/ https://reviews.llvm.org/D55895 ___ cfe-commits

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2018-12-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman marked an inline comment as done. arphaman added a comment. Herald added subscribers: dexonsmith, jkorous. Fixed comment, will commit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D36790/new/ https://reviews.llvm.org/D36790 ___ cfe

[PATCH] D36790: [ObjC] Messages to 'self' in class methods that return 'instancetype' should use the pointer to the class as the result type of the message

2018-12-20 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC349841: [ObjC] Messages to 'self' in class methods that return 'instancetype' should (authored by arphaman, committed by

[PATCH] D55823: [analyzer] Fix backward compatibility issue after D53280 'Emit an error for invalid -analyzer-config inputs'

2018-12-20 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. I think `Args.getArgString` might return `nullptr` so that's why you could crash. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55823/new/ https://reviews.llvm.org/D55823 ___ cfe-commits mai

<    1   2   3   4   5   6   7   8   9   10   >