[PATCH] D93104: [clang][cli] Revert accidental access-control flag rename

2020-12-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM. BTW, for partial reverts or potentially time-sensitive fixes like this, it's usually better to land first and ask questions later. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D93104: [clang][cli] Revert accidental access-control flag rename

2020-12-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D93104#2449783 , @dexonsmith wrote: > LGTM. BTW, for partial reverts or potentially time-sensitive fixes like this, > it's usually better to land first and ask questions later. (It'd be nice to have a test for this too if p

[PATCH] D93104: [clang][cli] Revert accidental access-control flag rename

2020-12-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a reviewer: MaskRay. dexonsmith added a comment. In D93104#2449787 , @dexonsmith wrote: > In D93104#2449783 , @dexonsmith > wrote: > >> LGTM. BTW, for partial reverts or potentially time-sensitive

[PATCH] D93148: Basic: Add native support for stdin to SourceManager and FileManager

2020-12-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere, jansvoboda11. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Herald added a project: clang. Add support for stdin to SourceManager and FileManager. Adds FileManager::getSTDIN,

[PATCH] D92968: Frontend: Migrate to FileEntryRef in TextDiagnosticTest, NFC

2020-12-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa60043219907: Frontend: Migrate to FileEntryRef in TextDiagnosticTest, NFC (authored by dexonsmith). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D92971: clang-import-test: Clean up error output for files that cannot be found

2020-12-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8c86197de3cb: clang-import-test: Clean up error output for files that cannot be found (authored by dexonsmith). Repository: rG LLVM Github Monorep

[PATCH] D92971: clang-import-test: Clean up error output for files that cannot be found

2020-12-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D92971#2449932 , @thakis wrote: > This breaks tests on Windows: http://45.33.8.238/win/29686/step_7.txt > > PTAL, and please revert for now if it takes a while to fix. I'll fix now. Repository: rG LLVM Github Monorepo C

[PATCH] D92971: clang-import-test: Clean up error output for files that cannot be found

2020-12-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D92971#2449934 , @dexonsmith wrote: > In D92971#2449932 , @thakis wrote: > >> This breaks tests on Windows: http://45.33.8.238/win/29686/step_7.txt >> >> PTAL, and please revert for no

[PATCH] D93216: [clang][cli] Squash multiple cc1 -fxxx-exceptions flags into single -exception-model=xxx option

2020-12-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM. I'll look at the prep commits in a moment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93216/new/ https://reviews.llvm.org/D9321

[PATCH] D83979: [clang][cli] Port LangOpts option flags to new option parsing system

2020-12-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. This LGTM now. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:293 static T mergeForwardValue(T KeyPath, U Value) { - return Value; + return static_cast(Valu

[PATCH] D93214: [clang][cli] Create accessors for exception models in LangOptions

2020-12-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. This LGTM, just a whitespace request from `clang-format`. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:760-761 Builder.defineMacro("__SEH__"); - else if

[PATCH] D93215: [clang][cli] Squash exception model in LangOptions into one member

2020-12-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith 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/D93215/new/ https://reviews.llvm.org/D93215

[PATCH] D84186: [clang][cli] Convert Analyzer option string based options to new option parsing system

2020-12-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith requested changes to this revision. dexonsmith added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:287 +static void +denormalizeString(SmallVectorImpl &Args, const char *Spelling, +

[PATCH] D91297: Frontend: Take VFS and MainFileBuffer by reference in PrecompiledPreamble::CanReuse, NFC

2020-12-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a reviewer: kadircet. dexonsmith added a comment. This revision now requires review to proceed. @kadircet, adding you explicitly as a blocking reviewer, since I suspect you've missed any emails generated from my previous pings. Please let me know whether you still have concerns.

[PATCH] D93248: Frontend: Fix layering between create{,Default}OutputFile, NFC

2020-12-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: erik.pilkington. Herald added subscribers: ributzka, jfb. dexonsmith requested review of this revision. Herald added a project: clang. Fix layering between `CompilerInstance::createDefaultOutputFile` and the two versions of `createOutp

[PATCH] D92975: Lex: Migrate HeaderSearch::LoadedModuleMaps to FileEntryRef

2020-12-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa40db5502b25: Lex: Migrate HeaderSearch::LoadedModuleMaps to FileEntryRef (authored by dexonsmith). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92975/new/

[PATCH] D93249: Frontend: Fix memory leak in CompilerInstance::setVerboseOutputStream

2020-12-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: erik.pilkington. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D93249 Files: clang/lib/Frontend/Comp

[PATCH] D93260: Frontend: Simplify handling of non-seeking streams in CompilerInstance, NFC

2020-12-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: erik.pilkington. Herald added subscribers: ributzka, hiraditya. dexonsmith requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: llvm-commits. Add a new `raw_pwrite_ostream` variant, `buffer_

[PATCH] D93094: [clang][cli] Prevent double denormalization

2020-12-15 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. LGTM too, once the test is fixed. Comment at: clang/unittests/Frontend/CompilerInvocationTest.cpp:267 - ASSERT_THAT(GeneratedArgs, Contains(StrEq("-fdebug-pass-manager"))); + ASSERT_EQ(count(GeneratedArgs, "-fde

[PATCH] D84668: [clang][cli] Port TargetOpts simple string based options to new option parsing system

2020-12-15 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:248 +template ::value, bool> = true> static void denormalizeSimpleEnum(SmallVectorImpl &Args, I don't think this needs to be templated; it can just use the same prototype it

[PATCH] D84190: [clang][cli] Port FrontendOpts simple string based options to new option parsing system

2020-12-15 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith 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/D84190/new/ https://reviews.llvm.org/D84190

[PATCH] D84187: [clang][cli] Port DependencyOutput string based options to new option parsing system

2020-12-15 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith 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/D84187/new/ https://reviews.llvm.org/D84187

[PATCH] D84186: [clang][cli] Convert Analyzer option string based options to new option parsing system

2020-12-15 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:261-263 /// The inlining stack depth limit. - // Cap the stack depth at 4 calls (5 stack frames, base + 4 calls). - unsigned InlineMaxStackDepth = 5; + unsigned InlineMax

[PATCH] D92975: Lex: Migrate HeaderSearch::LoadedModuleMaps to FileEntryRef

2020-12-15 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. There were also two Windows bots that emailed me yesterday afternoon, I just missed them somehow :/. - http://lab.llvm.org:8011/#/builders/119/builds/1381 (llvm-clang-win-x-aarch64) - http://lab.llvm.org:8011/#/builders/60/builds/1175 (llvm-clang-win-x-armv7l) FTR, t

[PATCH] D92975: Lex: Migrate HeaderSearch::LoadedModuleMaps to FileEntryRef

2020-12-15 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith reopened this revision. dexonsmith added a comment. This revision is now accepted and ready to land. Reopening for now, although I haven't updated the patch yet, or quite tracked down the issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D92975: Lex: Migrate HeaderSearch::LoadedModuleMaps to FileEntryRef

2020-12-15 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith planned changes to this revision. dexonsmith added a comment. Given that 5de00f3b56805c7e980f049ceb3f166f8c69cec0 updates the return value of `FileEntry::getDir` as a (self-described) hack, and `FileEntryRef::getDir` won't be similarly updated, it's somewhat reasonable that this would

[PATCH] D84186: [clang][cli] Convert Analyzer option string based options to new option parsing system

2020-12-16 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h:261-263 /// The inlining stack depth limit. - // Cap the stack depth at 4 calls (5 sta

[PATCH] D83892: [clang][cli] Port CodeGen option flags to new option parsing system

2020-12-16 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D83892#2458049 , @probinson wrote: > One thing this patch does, is make decisions about default behavior static. > Meaning, the option behavior cannot depend on other options; specifically, it > can't be based on the tripl

[PATCH] D83892: [clang][cli] Port CodeGen option flags to new option parsing system

2020-12-16 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D83892#2458603 , @dexonsmith wrote: > Maybe it's worth defining another set of derived multiclasses, [...] Another possibility of course is to make `Bool*Option` work this way (removing the ChangedBy, ResetBy, DefaultsToTru

[PATCH] D84189: [clang][cli] Let denormalizer decide how to render the option based on the option class

2020-12-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith 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/D84189/new/ https://reviews.llvm.org/D84189

[PATCH] D84675: [clang][cli] Streamline MarhsallingInfoFlag description

2020-12-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith 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/D84675/new/ https://reviews.llvm.org/D84675

[PATCH] D93540: [clang] Use enum for LangOptions::SYCLVersion instead of unsigned

2020-12-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. I've reviewed the code and it seems to do the right thing. I'd like a SYCL maintainer to take a look too though. (If for some reason changing the interface to an enum isn't desirable, maybe there's a compromise where there's an accessor that converts back to an inte

[PATCH] D92160: [clang] Fix wrong FDs are used for files with same name in Tooling

2020-12-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D92160#2453814 , @OikawaKirie wrote: > Replies from the original author Hao Zhang > > --- > > Sorry for replying late. > >> I think it would be good to understand why the tests failed. Are some >> clients relying on the nam

[PATCH] D92531: Basic: Support named pipes natively in SourceManager

2020-12-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith marked an inline comment as done. dexonsmith added a comment. Thanks for the review! Comment at: clang/lib/Basic/SourceManager.cpp:167 + // (which may have come from a stat cache). + if (ContentsEntry->isNamedPipe()) { +// Check the buffer size directly if this

[PATCH] D78058: option to write files to memory instead of disk

2020-12-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added subscribers: erik.pilkington, arphaman, Bigcheese. dexonsmith added a comment. I think this is important; thanks for working on it! I'm sorry I missed it before... coincidentally, I'm working in a similar problem space right now (likely I'll post a patch with an RFC next week) b

[PATCH] D93631: [clang][cli] Implement `getAllArgValues` marshalling

2020-12-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:338 +const std::vector &Values) { + for (const std::string& Value : V

[PATCH] D93628: [clang] NFC: Refactor custom class into a lambda in CompilerInvocation

2020-12-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. This looks like an improvement, so LGTM, but I have a couple of comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:160-161 -namespace { -template stru

[PATCH] D93698: [clang][cli] Port a CommaJoined option to the marshalling infrastructure

2020-12-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM, with one nit. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:333-337 +for (const std::string &Value : Values) { + if (&Value != &Values.front())

[PATCH] D93679: [clang][cli] Port getAllArgumentValues to the marshalling infrastructure

2020-12-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith 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/D93679/new/ https://reviews.llvm.org/D93679

[PATCH] D93701: [clang][cli] NFC: Make Diags optional in normalizer

2020-12-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. > This is needed for a future patch, where we start using normalizers in > contexts where no Diags are available. Can you explain what those contexts are? I'm wondering if they can be changed to create a `DiagnosticsEngine` instead of having to account for it being m

[PATCH] D93702: [clang][cli] NFC: Make marshalling macros reusable

2020-12-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3040 -#define OPTION_WITH_MARSHALLING( \ -PREFIX_TYPE, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \ -HELPTEXT, META

[PATCH] D84673: [clang][cli] Port DiagnosticOpts to new option parsing system

2020-12-22 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: llvm/utils/TableGen/OptParserEmitter.cpp:102-107 + std::string getMacroName() const { +if (KeyPath.startswith("DiagnosticOpts.")) + return (Twine("DIAG_") + MarshallingInfo::MacroName).str(); + +return MarshallingInfo::M

[PATCH] D92531: Basic: Support named pipes natively in SourceManager

2020-12-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG245218bb3555: Basic: Support named pipes natively in SourceManager and FileManager (authored by dexonsmith). Changed prior to commit: https://reviews.llvm.org/D92531?vs=311004&id=313618#toc Repository:

[PATCH] D93148: Basic: Add native support for stdin to SourceManager and FileManager

2020-12-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3ee43adfb20d: Basic: Add native support for stdin to SourceManager and FileManager (authored by dexonsmith). Changed prior to commit: https://revi

[PATCH] D78058: option to write files to memory instead of disk

2020-12-23 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D78058#2464262 , @dexonsmith wrote: > I'll reply here once I've posted the RFC and patch (as I said, I'm hoping > next week) so you can take a look. I don't quite have my patch and RFC ready (and I may not until I'm back fr

[PATCH] D90733: Frontend: Sink named pipe logic from CompilerInstance down to FileManager

2020-11-03 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Remove compilicated logic from CompilerInstance::InitializeSourceManager to deal with named pipes, updating FileManager::getBuff

[PATCH] D90478: Basic: Split out DirectoryEntry.h, NFC

2020-11-04 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG77a9e0a4af5a: Basic: Split out DirectoryEntry.h, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D9

[PATCH] D90481: Basic: Change Module::Umbrella to a PointerUnion, NFC

2020-11-04 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6e73cfa8363d: Basic: Change Module::Umbrella to a PointerUnion, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D90885: Tooling: Remove dead code for ToolingInvocation::mapVirtualFile

2020-11-05 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Follows through on c4cb3b10dc8c50e46c9fb1b7ae95e3c3c94975d3's FIXME from 2015. Anyone using this should migrate to InMemoryFileS

[PATCH] D90887: ARCMigrate: Stop abusing PreprocessorOptions for passing back file remappings, NFC

2020-11-05 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. As part of reducing use of PreprocessorOptions::RemappedFileBuffers, stop abusing it to pass information around remapped files i

[PATCH] D90888: Frontend: Remove redundant call to CompilerInstance::setFileManager, NFC

2020-11-05 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. `ASTUnit::Parse` sets up the `FileManager` earlier in the same function, ensuring `ASTUnit::getFileManager()` matches `Clang->get

[PATCH] D90888: Frontend: Remove redundant call to CompilerInstance::setFileManager, NFC

2020-11-05 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Frontend/ASTUnit.cpp:1135-1141 // Ensure that Clang has a FileManager with the right VFS, which may have // changed above in AddImplicitPreamble. If VFS is nullptr, rely on // createFileManager to create one. if

[PATCH] D90889: Remove RemappedFiles param from ASTUnit::LoadFromASTFile, NFC

2020-11-05 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. This parameter is always set to `None`. Remove it. https://reviews.llvm.org/D90889 Files: clang/include/clang/Frontend/ASTUn

[PATCH] D90890: Frontend: Change ComputePreambleBounds to take MemoryBufferRef, NFC

2020-11-05 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere. Herald added subscribers: usaxena95, ributzka, kadircet. dexonsmith requested review of this revision. Avoid requiring an actual MemoryBuffer in ComputePreambleBounds, when a MemoryBufferRef will do just fine.

[PATCH] D90957: Frontend: Skip namespace around createVFSFromCompilerInvocation definition, NFC

2020-11-06 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, jansvoboda11, JDevlieghere. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Qualify definitions with `clang::` rather than opening/closing a namespace. https://reviews.llvm.org/D90957 File

[PATCH] D82756: Port some floating point options to new option marshalling infrastructure

2020-11-09 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D82756#2382885 , @jansvoboda11 wrote: > @dexonsmith, could you please commit this one for me? I don't have the rights > to do so, as this is my first patch. Sure; what do you want for `GIT_AUTHOR_NAME` and `GIT_AUTHOR_EMAI

[PATCH] D90885: Tooling: Remove dead code for ToolingInvocation::mapVirtualFile

2020-11-09 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc56ec7bedeb8: Tooling: Remove dead code for ToolingInvocation::mapVirtualFile (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D82756: Port some floating point options to new option marshalling infrastructure

2020-11-09 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D82756#2383317 , @jansvoboda11 wrote: > Thanks, `Jan Svoboda` and `jan_svob...@apple.com` is fine. Is it possible to > add @dang as a co-author? `git log` says he uses `Daniel Grumberg` and > `dany.grumb...@gmail.com`. I

[PATCH] D82756: Port some floating point options to new option marshalling infrastructure

2020-11-09 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdbfa69c5024c: Port some floating point options to new option marshalling infrastructure (authored by jansvoboda11, committed by dexonsmith). Changed prior to commit: https://reviews.llvm.org/D82756?vs=3

[PATCH] D90890: Frontend: Change ComputePreambleBounds to take MemoryBufferRef, NFC

2020-11-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 304195. dexonsmith added a comment. Missed a couple of calls from clang-tools-extra. Fixed those. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90890/new/ https://reviews.llvm.org/D90890 Files: clang-tools-extra/clangd/CodeComplete.cpp clang

[PATCH] D91204: [[clang-scan-deps] Fix for input file given as relative path in compilation database "command" entry

2020-11-10 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Can we use `getPhysicalFileSystem()` instead of `getRealFileSystem()` here? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91204/new/ https://reviews.llvm.org/D91204 ___ cfe-co

[PATCH] D82860: Port ObjCMTAction to new option parsing system

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D82860#2388916 , @jpienaar wrote: > This seems to breaking clang-5 builds: > > utils/TableGen/CMakeFiles/llvm-tblgen.dir/OptParserEmitter.cpp.o: In function > `llvm::EmitOptParser(llvm::RecordKeeper&, llvm::raw_ostream&)': >

[PATCH] D91204: [clang-scan-deps] Fix for input file given as relative path in compilation database "command" entry

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D91204#2387050 , @saudi wrote: > Updated the patch. > > Followed suggestion from @dexonsmith. Indeed it simplifies the code. > Also, improved the test, to also test with -j 2 A couple of more comments. @arphaman , can you co

[PATCH] D91147: AArch64: classify Triple::aarch64_32 as AArch64

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Driver/ToolChain.cpp:1066 if (getTriple().getArch() == llvm::Triple::x86_64 || - getTriple().isAArch64() || getTriple().isRISCV()) + (getTriple().isAArch64() && getTriple().isArch64Bit()) || + getTriple().i

[PATCH] D90957: Frontend: Skip namespace around createVFSFromCompilerInvocation definition, NFC

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4e9af3d47847: Frontend: Skip namespace around createVFSFromCompilerInvocation definition, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D91295: Frontend: Remove unused parameter from ASTUnit::LoadFromCompilerInvocationAction, NFC

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: JDevlieghere, jansvoboda11. Herald added subscribers: ributzka, arphaman. dexonsmith requested review of this revision. Drop `IncludeBriefCommentsInCodeCompletion` since it is always `false`. https://reviews.llvm.org/D91295 Files:

[PATCH] D91296: Frontend: Clarify logic for using the preamble in ASTUnit::CodeComplete, almost NFC

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere, jansvoboda11. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Clarify the logic for using the preamble (and overriding the main file buffer) in `ASTUnit::CodeComplete` by factor

[PATCH] D91297: Frontend: Take VFS and MainFileBuffer by reference in PrecompiledPreamble::CanReuse, NFC

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: JDevlieghere, arphaman, jansvoboda11. Herald added subscribers: usaxena95, ributzka, kadircet. dexonsmith requested review of this revision. Clarify that `PrecompiledPreamble::CanReuse` requires non-null arguments for `VFS` and `MainFil

[PATCH] D91298: Frontend: Always create a new FileManager in ASTUnit::CodeComplete

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: JDevlieghere, arphaman, jansvoboda11, akyrtzi. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. The filesystem underneath it may have changed. This matches other `ASTUnit` entry points like `Reparse`, a

[PATCH] D91300: WIP: Frontend: Use an InMemoryFileSystem for the RemappedFiles parameter in ASTUnit

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, JDevlieghere, jansvoboda11, akyrtzi. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Re-implement the `RemappedFiles` parameter to various `ASTUnit` entry points by storing buffers in an `In

[PATCH] D91204: [clang-scan-deps] Fix for input file given as relative path in compilation database "command" entry

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp:158-160 + llvm::IntrusiveRefCntPtr PhysicalFileSystem( + llvm::vfs::createPhysicalFileSystem().release()); + RealFS = new llvm::vfs::ProxyFileSystem(PhysicalFil

[PATCH] D91204: [clang-scan-deps] Fix for input file given as relative path in compilation database "command" entry

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/test/ClangScanDeps/relative_directory.cpp:12-13 + +// The output order is non-deterministic when using more than one thread, +// so check the output using two runs. +// RUN: clang-scan-deps -compilation-database %t.cdb -j 2 | Fi

[PATCH] D91300: WIP: Frontend: Use an InMemoryFileSystem for the RemappedFiles parameter in ASTUnit

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a subscriber: kadircet. dexonsmith added inline comments. Comment at: clang/lib/Frontend/PrecompiledPreamble.cpp:571-579 +if (OverriddenFilesFS) { + std::unique_ptr Buffer; + if (moveOnNoError(OverriddenFilesFS->getBufferForFile(F.first()), +

[PATCH] D91204: [clang-scan-deps] Fix for input file given as relative path in compilation database "command" entry

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added 1 blocking reviewer(s): arphaman. dexonsmith added a comment. This LGTM, but I'd like @arphaman to look as well in case he originally tried `getPhysicalFileSystem` and it caused a problem. I've switched him to a blocking reviewer. CHANGES SIN

[PATCH] D90890: Frontend: Change ComputePreambleBounds to take MemoryBufferRef, NFC

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4c55c3b66dea: Frontend: Change ComputePreambleBounds to take MemoryBufferRef, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D90484: FileManager: Add FileEntryRef::getDir, returning DirectoryEntryRef

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90484/new/ https://reviews.llvm.org/D90484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D90053: Serialization: Change InputFile to use FileEntryRef and add getVirtualFileRef, NFC

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90053/new/ https://reviews.llvm.org/D90053 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D90485: Lex: Update Module::findHeader to return FileEntryRef, NFC

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90485/new/ https://reviews.llvm.org/D90485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D90733: Frontend: Sink named pipe logic from CompilerInstance down to FileManager

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90733/new/ https://reviews.llvm.org/D90733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D90497: Module: Use FileEntryRef and DirectoryEntryRef in Umbrella, Header, and DirectoryName, NFC

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90497/new/ https://reviews.llvm.org/D90497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D90887: ARCMigrate: Stop abusing PreprocessorOptions for passing back file remappings, NFC

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90887/new/ https://reviews.llvm.org/D90887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D91317: Support: Add RedirectingFileSystem::create from simple list of redirections

2020-11-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: JDevlieghere, jansvoboda11. Herald added subscribers: llvm-commits, ributzka, hiraditya. Herald added a project: LLVM. dexonsmith requested review of this revision. Add an overload of `RedirectingFileSystem::create` that builds a redire

[PATCH] D91342: WIP: Frontend: Handle PreprocessorOptions::RemappedFiles in createVFSFromCompilerInvocation

2020-11-12 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: JDevlieghere, jansvoboda11, akyrtzi. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Instead of threading `PreprocessorOptions::RemappedFiles` through to the `SourceManager`, handle it in `createVFSFro

[PATCH] D91300: WIP: Frontend: Use an InMemoryFileSystem for the RemappedFiles parameter in ASTUnit

2020-11-12 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Note, I just discovered this patch changes behaviour in the ASTReader that was only indirectly tested previously via the file-to-file remapping command-line options. I've blocked this on https://reviews.llvm.org/D91342 for now, since that patch reimplements the file-

[PATCH] D91366: Serialization: Hoist the check for in-flight diagnostics in ASTReader::getInputFile, NFC

2020-11-12 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: jansvoboda11. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. This logic seems easier to follow without the `Error()` helper, and checking `DiagnosticsEngine::isDiagnosticInFlight` just once up front.

[PATCH] D91367: Serialization: Merge three diagnostics to simplify ASTReader::getInputFile, NFC

2020-11-12 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: jansvoboda11. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. Clean up the logic for `err_fe_{pch,module,ast}_file_modified` to use a `select` like other ASTReader diagnostics. There should be no func

[PATCH] D91368: Frontend: Split out addVFSOverlays from createVFSFromCompilerInvocation, NFC

2020-11-12 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: JDevlieghere, jansvoboda11, akyrtzi. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. This is a prep patch to reduce noise in a follow-up, which will add another layer. https://reviews.llvm.org/D91368

[PATCH] D91367: Serialization: Merge three diagnostics to simplify ASTReader::getInputFile, NFC

2020-11-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSerializationKinds.td:20 "malformed block record in PCH file: '%0'">, DefaultFatal; def err_fe_pch_file_modified : Error< +"file '%0' has been modified since the " jansvob

[PATCH] D91436: Serialization: Rename three AST diagnostics, NFC

2020-11-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: jansvoboda11. Herald added a subscriber: ributzka. dexonsmith requested review of this revision. All three diagnostics have a select between "PCH", "module", and "AST" in the text. The most generic of these is "AST", so rename them fro

[PATCH] D91367: Serialization: Merge three diagnostics to simplify ASTReader::getInputFile, NFC

2020-11-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 305184. dexonsmith added a comment. Rename to use `ast_` to match https://reviews.llvm.org/D91436. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91367/new/ https://reviews.llvm.org/D91367 Files: clang/include/clang/Basic/DiagnosticSerializatio

[PATCH] D91366: Serialization: Hoist the check for in-flight diagnostics in ASTReader::getInputFile, NFC

2020-11-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd87fd096ac3e: Serialization: Hoist the check for in-flight diagnostics in ASTReader… (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D91436: Serialization: Rename three AST diagnostics, NFC

2020-11-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb764a62f02e1: Serialization: Rename three AST diagnostics, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D87928: Provide -fsource-dir flag in Clang

2020-11-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added reviewers: Bigcheese, jansvoboda11, arphaman. dexonsmith added a comment. I missed this before, and it's an interesting problem. I have a few questions: - I'm not clear on the expected interaction between the current working directory of the compiler and `-fsource-dir`. What ha

[PATCH] D91367: Serialization: Merge three diagnostics to simplify ASTReader::getInputFile, NFC

2020-11-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa2f2c2f3a463: Serialization: Merge three diagnostics to simplify ASTReader::getInputFile, NFC (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D91295: Frontend: Remove unused parameter from ASTUnit::LoadFromCompilerInvocationAction, NFC

2020-11-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcfde3edeae47: Frontend: Remove unused parameter from ASTUnit… (authored by dexonsmith). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D87928: Provide -fsource-dir flag in Clang

2020-11-17 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D87928#2396448 , @phosek wrote: > `-fsource-dir` is only used for coverage mapping and macros. Oh, interesting; it would be nice to consistently make all paths relative paths. > Here `out/default` is the working directory s

[PATCH] D83693: Port analyzer flags to new option parsing system

2020-11-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. This LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83693/new/ https://reviews.llvm.org/D83693 ___

[PATCH] D83691: Port Comment option flags to new parsing system

2020-11-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM after you fix a couple of nits. Comment at: clang/include/clang/Driver/Options.td:405 +// Comment Options + Nit: please end the comment with a

[PATCH] D83211: Factor out call to EXTRACTOR in generateCC1CommandLine

2020-11-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4062 + if ((FLAGS)&options::CC1Option) { \ +const auto &Extracted = EXTRACTOR(this->KEYPATH); \ +if (ALWAYS_EMIT

[PATCH] D83211: Factor out call to EXTRACTOR in generateCC1CommandLine

2020-11-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:3938 + if ((FLAGS)&options::CC1Option) { \ +const auto &Extracted = EXTRACTOR(this->KEYPATH); \ +if (ALWAYS_EMIT

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