[PATCH] D51157: [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative Load Hardening.

2018-08-23 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc marked an inline comment as done. chandlerc added inline comments. Comment at: llvm/docs/LangRef.rst:1659-1661 +that hardening. It should also be possible to *not* harden a hot and/or safe +function and have code inlined there *not* be hardened (even if the gen

[PATCH] D51157: [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative Load Hardening.

2018-08-23 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc updated this revision to Diff 162325. chandlerc added a comment. Move to a more conservative model suggested by Kristof. Repository: rL LLVM https://reviews.llvm.org/D51157 Files: clang/include/clang/Driver/Options.td clang/include/clang/Frontend/CodeGenOptions.def clang/lib/

[PATCH] D51178: [ASTImporter] Add test for importing anonymous namespaces.

2018-08-23 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added inline comments. This revision is now accepted and ready to land. Comment at: test/Import/cxx-anon-namespace/test.cpp:10 +// This is for the nested anonymous namespace. +// CHECK-NEXT: UsingDirectiveDecl +// CHECK-SAME: '' ---

[PATCH] D51157: [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative Load Hardening.

2018-08-23 Thread Kristof Beyls via Phabricator via cfe-commits
kristof.beyls added inline comments. Comment at: llvm/docs/LangRef.rst:1659-1661 +that hardening. It should also be possible to *not* harden a hot and/or safe +function and have code inlined there *not* be hardened (even if the generic +form is hardened). ---

[PATCH] D50564: Add support for SEH unwinding on Windows.

2018-08-23 Thread Kristina Brooks via Phabricator via cfe-commits
kristina added a comment. I'd say LGTM since it's an introduction of any sort of **runtime** within the LLVM project scope that deals with SEH specifically. So far all the published code is pretty much exclusively related to Clang/LLVM IR and MC support for codegen of SEH related code, but with

Re: r294176 - [AVR] Add support for the full set of inline asm constraints

2018-08-23 Thread Chandler Carruth via cfe-commits
This was due to r340519. I've fixed it in r340596 to clean things up. On Thu, Aug 23, 2018 at 8:20 PM Chandler Carruth wrote: > Trying new address again... > > > On Thu, Aug 23, 2018 at 8:17 PM Chandler Carruth > wrote: > >> Sorry for ancient thread revival, but... >> >> On Mon, Feb 6, 2017 at

r340596 - [AVR] Fix inline asm calls now that the addrspace(0) there is explicit.

2018-08-23 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Thu Aug 23 21:45:04 2018 New Revision: 340596 URL: http://llvm.org/viewvc/llvm-project?rev=340596&view=rev Log: [AVR] Fix inline asm calls now that the addrspace(0) there is explicit. This updates the test case for r340519 so it should pass again. r340522 only got some of

[PATCH] D51157: [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative Load Hardening.

2018-08-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1150 + Opts.SpeculativeLoadHardening = + Args.hasFlag(OPT_mspeculative_load_hardening, You can just use `hasArg(OPT_mspeculative_load_harden

Re: r294176 - [AVR] Add support for the full set of inline asm constraints

2018-08-23 Thread Chandler Carruth via cfe-commits
Trying new address again... On Thu, Aug 23, 2018 at 8:17 PM Chandler Carruth wrote: > Sorry for ancient thread revival, but... > > On Mon, Feb 6, 2017 at 2:10 AM Dylan McKay via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: dylanmckay >> Date: Mon Feb 6 03:01:59 2017 >> New Re

Re: r294176 - [AVR] Add support for the full set of inline asm constraints

2018-08-23 Thread Chandler Carruth via cfe-commits
Sorry for ancient thread revival, but... On Mon, Feb 6, 2017 at 2:10 AM Dylan McKay via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: dylanmckay > Date: Mon Feb 6 03:01:59 2017 > New Revision: 294176 > > URL: http://llvm.org/viewvc/llvm-project?rev=294176&view=rev > Log: > [AVR] Add

[PATCH] D51157: [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative Load Hardening.

2018-08-23 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc updated this revision to Diff 162322. chandlerc added a comment. Add a test file that I somehow missed earlier (sorry about that). Repository: rL LLVM https://reviews.llvm.org/D51157 Files: clang/include/clang/Driver/Options.td clang/include/clang/Frontend/CodeGenOptions.def

[PATCH] D50043: [RISCV] RISC-V using -fuse-init-array by default

2018-08-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL340595: [RISCV] RISC-V using -fuse-init-array by default (authored by kito, committed by ). Herald added subscribers: llvm-commits, jrtc27. Changed prior to commit: https://reviews.llvm.org/D50043?vs=16

[PATCH] D51157: [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative Load Hardening.

2018-08-23 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc added a comment. Thanks, should all be addressed now. Comment at: clang/lib/Driver/ToolChains/Arch/X86.cpp:169-170 options::OPT_mno_retpoline_external_thunk, false)) { // FIXME: Add a warning about failing to specify `-mretpoline` and

[PATCH] D51157: [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative Load Hardening.

2018-08-23 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc updated this revision to Diff 162319. chandlerc marked 3 inline comments as done. chandlerc added a comment. Address review comments. Repository: rL LLVM https://reviews.llvm.org/D51157 Files: clang/include/clang/Driver/Options.td clang/include/clang/Frontend/CodeGenOptions.def

[PATCH] D48027: [analyzer] Improve `CallDescription` to handle c++ method.

2018-08-23 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. In https://reviews.llvm.org/D48027#1209844, @NoQ wrote: > So i believe that one of the important remaining problems with > `CallDescription` is to teach it to discriminate between global functions and > methods. We can do it in a number of ways: > > 1. Make a special sub-cl

[PATCH] D51189: [Sema][ObjC] Infer availability of +new from availability of -init

2018-08-23 Thread Steven Wu via Phabricator via cfe-commits
steven_wu added a comment. I feel like this is a much tricky situation than just new and init. Following example is the same situation. __attribute__((objc_root_class)) @interface NSObject - (void) foo; - (void) bar; @end @implementation NSObject - (void) foo {} - (void) bar {

[PATCH] D51189: [Sema][ObjC] Infer availability of +new from availability of -init

2018-08-23 Thread Juergen Ributzka via Phabricator via cfe-commits
ributzka added a comment. TAPI mostly cares about linkable symbols, so this shouldn't be a problem. Repository: rC Clang https://reviews.llvm.org/D51189 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D51204: [COFF, ARM64] Add MS intrinsics: __getReg, _ReadStatusReg, _WriteStatusReg

2018-08-23 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, compnerd, mstorsjo, haripul, TomTan. Herald added a reviewer: javed.absar. Herald added subscribers: chrib, kristof.beyls. Added declarations for the intrinsics in arm64intr.h. These are defined in MSVC libs and are needed for certain spe

[PATCH] D51198: [LTO] Fix -save-temps with LTO and unnamed globals.

2018-08-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson accepted this revision. tejohnson added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D51198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D51189: [Sema][ObjC] Infer availability of +new from availability of -init

2018-08-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a subscriber: ributzka. arphaman added a comment. In https://reviews.llvm.org/D51189#1211763, @erik.pilkington wrote: > In https://reviews.llvm.org/D51189#1211754, @arphaman wrote: > > > Hmm, I don't think this solution is ideal, we'd rather have an attribute > > somewhere for oth

[PATCH] D51200: Introduce per-callsite inline intrinsics

2018-08-23 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar added a comment. Disclaimer: I'm a Clang newbie and I'm not sure if that's a good way to implement these intrinsics. I'm not sure about the following things: - The new enum CallInlineKind may not be in the right place - Not sure if adding the extra parameter to EmitSomething methods is the

[PATCH] D51198: [LTO] Fix -save-temps with LTO and unnamed globals.

2018-08-23 Thread Eli Friedman via Phabricator via cfe-commits
efriedma updated this revision to Diff 162308. efriedma added a comment. Fix new pass manager. Repository: rC Clang https://reviews.llvm.org/D51198 Files: lib/CodeGen/BackendUtil.cpp test/CodeGen/summary-index-unnamed-global.ll Index: test/CodeGen/summary-index-unnamed-global.ll ==

[PATCH] D51200: Introduce per-callsite inline intrinsics

2018-08-23 Thread Jakub Kuderski via Phabricator via cfe-commits
kuhar created this revision. kuhar added reviewers: rsmith, pcc, Prazek, sanjoy. kuhar added a project: clang. Herald added a subscriber: eraman. Herald added a reviewer: grosser. Traditionally, to force some inlining decisions one has to annotate function declarations with `__attribute__((always

[PATCH] D50318: Support Swift in platform availability attribute

2018-08-23 Thread Michael Wu via Phabricator via cfe-commits
michaelwu added a comment. Review ping Repository: rC Clang https://reviews.llvm.org/D50318 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51198: [LTO] Fix -save-temps with LTO and unnamed globals.

2018-08-23 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. Thanks. Can you fix the same code in EmitAssemblyWithNewPassManager? Repository: rC Clang https://reviews.llvm.org/D51198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D51049: Driver: Enable address-significance tables by default when targeting COFF.

2018-08-23 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. https://reviews.llvm.org/D51199 fixes the above breakage as well as crbug.com/877235. Once it lands, I'll reland this change. Repository: rC Clang https://reviews.llvm.org/D51049 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D51198: [LTO] Fix -save-temps with LTO and unnamed globals.

2018-08-23 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added reviewers: tejohnson, tobiasvk. Herald added subscribers: dexonsmith, inglorion. If all LLVM passes are disabled, we can't emit a summary because there could be unnamed globals in the IR. Repository: rC Clang https://reviews.llvm.org/D51198 Fil

[PATCH] D51189: [Sema][ObjC] Infer availability of +new from availability of -init

2018-08-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In https://reviews.llvm.org/D51189#1211754, @arphaman wrote: > Hmm, I don't think this solution is ideal, we'd rather have an attribute > somewhere for other consumers of availability annotations. Does MyObject have > an implicit decl of `new`, or are we referri

[PATCH] D51189: [Sema][ObjC] Infer availability of +new from availability of -init

2018-08-23 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Hmm, I don't think this solution is ideal, we'd rather have an attribute somewhere for other consumers of availability annotations. Does MyObject have an implicit decl of `new`, or are we referring to `NSObject`s `new`? Ideally we would an attribute on a particular `ne

[PATCH] D51170: [libc++] Remove race condition in std::async

2018-08-23 Thread JF Bastien via Phabricator via cfe-commits
jfb accepted this revision. jfb added inline comments. This revision is now accepted and ready to land. Comment at: libcxx/include/future:556 bool __has_value() const {return (__state_ & __constructed) || (__exception_ != nullptr);} I'm not auditi

[PATCH] D37624: add support for -fno-instrument-functions and -finstrument-functions-exclude-{file, function}-list= to match gcc options.

2018-08-23 Thread Ana Pazos via Phabricator via cfe-commits
apazos added a comment. Herald added a subscriber: erik.pilkington. Hello folks, is there a plan to merge this feature still? https://reviews.llvm.org/D37624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called

2018-08-23 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. In https://reviews.llvm.org/D47757#1211276, @tra wrote: > I've confirmed that the patch does not break anything in our CUDA code, so > it's good to go as far as CUDA is concerned. Thanks. @rsmith, do you have any other comments about the patch? Repository: rC Clan

[PATCH] D51190: [AttrDocs]: document gnu_inline function attribute

2018-08-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 162291. nickdesaulniers added a comment. - link to correct doc Repository: rC Clang https://reviews.llvm.org/D51190 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td Index: include/clang/Basic/AttrDocs.td ==

[PATCH] D51192: Fix reported range of partial token replacement

2018-08-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 162288. steveire added a comment. Fix reported range of partial token replacement Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51192 Files: clang-tidy/ClangTidy.cpp Index: clang-tidy/ClangTidy.cpp

[PATCH] D51192: Fix reported range of partial token replacement

2018-08-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: klimek, rsmith. Herald added a subscriber: cfe-commits. Fixes bug: 38678 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51192 Files: clang-tidy/ClangTidy.cpp Index: clang-tidy/ClangTidy.cpp ==

r340586 - Fix typo

2018-08-23 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Thu Aug 23 15:41:52 2018 New Revision: 340586 URL: http://llvm.org/viewvc/llvm-project?rev=340586&view=rev Log: Fix typo Modified: cfe/trunk/utils/TableGen/ClangCommentHTMLNamedCharacterReferenceEmitter.cpp Modified: cfe/trunk/utils/TableGen/ClangCommentHTMLNamedChara

[PATCH] D50738: Remove vestiges of configure buildsystem

2018-08-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 162283. steveire added a comment. Remove vestiges of configure buildsystem Repository: rC Clang https://reviews.llvm.org/D50738 Files: CMakeLists.txt Index: CMakeLists.txt === --- CMake

[PATCH] D50662: Add dump() method for SourceRange

2018-08-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: unittests/Basic/SourceManagerTest.cpp:189 + + // TODO: How do I get a loc in another file? + auto headerLoc = SourceMgr.getSpellingLoc(SourceMgr.translateLineCol(MainFileID, 3, 5)); I don't know how to resolve this T

[PATCH] D50662: Add dump() method for SourceRange

2018-08-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 162282. steveire marked 3 inline comments as done. steveire added a comment. Add dump() and supporting methods to SourceRange Repository: rC Clang https://reviews.llvm.org/D50662 Files: include/clang/Basic/SourceLocation.h lib/Basic/SourceLocation.c

[PATCH] D50662: Add dump() method for SourceRange

2018-08-23 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 162280. steveire added a comment. Add dump() and supporting methods to SourceRange Repository: rC Clang https://reviews.llvm.org/D50662 Files: include/clang/Basic/SourceLocation.h lib/Basic/SourceLocation.cpp unittests/Basic/SourceManagerTest.cpp

[PATCH] D51190: [AttrDocs]: document gnu_inline function attribute

2018-08-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added a reviewer: rsmith. Herald added a subscriber: cfe-commits. This wasn't documented https://clang.llvm.org/docs/AttributeReference.html, and briefly mentioned https://clang.llvm.org/docs/UsersManual.html#differences-between-various-stan

[PATCH] D51189: [Sema][ObjC] Infer availability of +new from availability of -init

2018-08-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added a reviewer: arphaman. Herald added a subscriber: dexonsmith. rdar://18335828 Thanks! Erik Repository: rC Clang https://reviews.llvm.org/D51189 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/DeclObjC.h cl

[PATCH] D51011: [Preprocessor] raise gcc compatibility macros.

2018-08-23 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Kernel patch: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=815f0ddb346c196018d4d8f8f55c12b83da1de3f Thanks Eli and Richard, I appreciate it. Repository: rC Clang https://reviews.llvm.org/D51011

[PATCH] D51187: Thread safety analysis: Warn on double (un-)lock of scoped capability

2018-08-23 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: delesley, aaron.ballman. Herald added a subscriber: cfe-commits. We now warn when acquiring or releasing a scoped capability a second time, not just if the underlying mutexes have been acquired or released a second time. It's debata

r340580 - Remove more const_casts by using ConstStmtVisitor [NFC]

2018-08-23 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Thu Aug 23 14:53:04 2018 New Revision: 340580 URL: http://llvm.org/viewvc/llvm-project?rev=340580&view=rev Log: Remove more const_casts by using ConstStmtVisitor [NFC] Again, this required adding some const specifiers. Modified: cfe/trunk/lib/Analysis/ThreadSafety.

[PATCH] D51049: Driver: Enable address-significance tables by default when targeting COFF.

2018-08-23 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc reopened this revision. pcc added a comment. This revision is now accepted and ready to land. I received another report of breakage so I reverted in https://reviews.llvm.org/rC340579. Repository: rC Clang https://reviews.llvm.org/D51049 ___

r340579 - Revert r340552, "Driver: Enable address-significance tables by default when targeting COFF."

2018-08-23 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Thu Aug 23 14:34:57 2018 New Revision: 340579 URL: http://llvm.org/viewvc/llvm-project?rev=340579&view=rev Log: Revert r340552, "Driver: Enable address-significance tables by default when targeting COFF." Received multiple reports of breakage due to undefined symbols suspected

[PATCH] D51049: Driver: Enable address-significance tables by default when targeting COFF.

2018-08-23 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Thanks, I'll take a look. Repository: rC Clang https://reviews.llvm.org/D51049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51049: Driver: Enable address-significance tables by default when targeting COFF.

2018-08-23 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. This breaks Windows bot http://lab.llvm.org:8011/builders/sanitizer-windows/builds/33846/steps/run%20check-asan/logs/stdio 742542.065 [0/1/37] Running the AddressSanitizer tests -- Testing: 607 tests, 16 threads -- Testing: 0 .. 10.. 20.. 30.. 40.. 50 FAIL: A

r340575 - Remove unnecessary const_cast [NFC]

2018-08-23 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Thu Aug 23 14:13:32 2018 New Revision: 340575 URL: http://llvm.org/viewvc/llvm-project?rev=340575&view=rev Log: Remove unnecessary const_cast [NFC] This required adding a few const specifiers on functions. Also a minor formatting fix suggested in D49885. Modified:

[PATCH] D50564: Add support for SEH unwinding on Windows.

2018-08-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Not much more comments from me. The implementation seems reasonable, and works for one simple test I did (with an earlier revision of the patch at least), and further refinement can happen in-tree I guess. I'd like to have someone else (@rnk @compnerd?) give it a more

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-23 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld planned changes to this revision. Hahnfeld added a comment. This patch breaks C++ and CUDA compilation at the moment, sorry. I need to find and add more macros that turn out to be needed. Repository: rC Clang https://reviews.llvm.org/D50845 ___

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-23 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. In https://reviews.llvm.org/D50845#1211463, @gregrodgers wrote: > What am I missing? As discussed above this patch doesn't fix this problem. However we need `__x86_64__` because `bits/wordsize.h` will use it to determine if we are 64- or 32-bit. Repository: rC Cl

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-23 Thread Greg Rodgers via Phabricator via cfe-commits
gregrodgers added a comment. I have a longer comment on header files, but let me first understand this patch. IIUC,the concept of this patch is to fake the macros to think it is seeing a host on the device patch. if ((LangOpts.CUDA || LangOpts.OpenMPIsDevice) && PP.getAuxTargetInfo()) Initi

[PATCH] D51157: [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative Load Hardening.

2018-08-23 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/Driver/Options.td:2004-2007 +def mspeculative_load_hardening : Flag<["-"], "mspeculative-load-hardening">, + Group, Flags<[CoreOption,CC1Option]>; +def mno_speculative_load_hardening : Flag<["-"], "mno-speculative-lo

[PATCH] D51132: [clang-tidy] abseil-redundant-strcat-calls-check

2018-08-23 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 162256. hugoeg added a comment. minor fixes and style improvement https://reviews.llvm.org/D51132 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/RedundantStrcatCallsCheck.cpp clang-tidy/abseil/Redunda

[PATCH] D51159: [FileManager] Do not call 'real_path' in getFile().

2018-08-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Basic/FileManager.cpp:319 - SmallString<128> RealPathName; - if (!FS->getRealPath(InterndFileName, RealPathName)) -UFE.RealPathName = RealPathName.str(); + if (UFE.File) { +if (auto Path = UFE.File->getName()) { -

[PATCH] D51157: [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative Load Hardening.

2018-08-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. It makes sense to me to do this all in one go and defer the clang `__attribute__` until later. Comment at: llvm/include/llvm/IR/Attributes.td:249 def : MergeRule<"adjustNullPoint

Re: r314872 - We allow implicit function declarations as an extension in all C dialects. Remove OpenCL special case.

2018-08-23 Thread Richard Smith via cfe-commits
On Thu, 23 Aug 2018 at 02:52, Anastasia Stulova via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi Richard, > > > There was a change in the spec to disallow unprototyped functions, which > was made this year. Unfortunately it seems it didn't make into the Khronos > registry yet to appear pu

[PATCH] D51159: [FileManager] Do not call 'real_path' in getFile().

2018-08-23 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: lib/Basic/FileManager.cpp:319 - SmallString<128> RealPathName; - if (!FS->getRealPath(InterndFileName, RealPathName)) -UFE.RealPathName = RealPathName.str(); + if (UFE.File) { +if (auto Path = UFE.File->getName()) { -

[PATCH] D48687: [clangd] Avoid duplicates in findDefinitions response

2018-08-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Herald added a subscriber: kadircet. Comment at: clangd/SourceCode.cpp:209 + llvm::SmallString<128> RealPath; + if (SourceMgr.getFileManager().getVirtualFileSystem()->getRealPath( + Path, RealPath)) { With the recent perfo

[PATCH] D51061: [clang-tidy] abseil-str-cat-append

2018-08-23 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 162253. hugoeg added a comment. minor fixes, style improvements https://reviews.llvm.org/D51061 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/StrCatAppendCheck.cpp clang-tidy/abseil/StrCatAppendCheck

[PATCH] D51159: [FileManager] Do not call 'real_path' in getFile().

2018-08-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Basic/FileManager.cpp:319 - SmallString<128> RealPathName; - if (!FS->getRealPath(InterndFileName, RealPathName)) -UFE.RealPathName = RealPathName.str(); + if (UFE.File) { +if (auto Path = UFE.File->getName()) { -

[PATCH] D50564: Add support for SEH unwinding on Windows.

2018-08-23 Thread Charles Davis via Phabricator via cfe-commits
cdavis5x marked 2 inline comments as done. cdavis5x added inline comments. Comment at: src/Unwind-seh.cpp:163 +#ifdef __x86_64__ +unw_get_reg(&cursor, UNW_X86_64_RAX, &retval); +unw_get_reg(&cursor, UNW_X86_64_RDX, &exc->private_[3]); mstorsjo wrote: > Wi

[PATCH] D50564: Add support for SEH unwinding on Windows.

2018-08-23 Thread Charles Davis via Phabricator via cfe-commits
cdavis5x updated this revision to Diff 162250. cdavis5x marked 7 inline comments as done. cdavis5x added a comment. - Remove unnecessary code. - Guard against rogue personality functions returning wrong values. - Add a comment clarifying the purpose of the `new_ctx` variable. Repository: rUNW

[PATCH] D51154: [clangd] Log memory usage of DexIndex and MemIndex

2018-08-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Do we plan to expose an API in `ClangdServer` to allow C++ API users to track index memory usages? Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:123 + size_t Bytes = Index.estimateMemoryUsage(); + for (const auto &Scheme : URISchemes) { +

[PATCH] D51159: [FileManager] Do not call 'real_path' in getFile().

2018-08-23 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: lib/Basic/FileManager.cpp:319 - SmallString<128> RealPathName; - if (!FS->getRealPath(InterndFileName, RealPathName)) -UFE.RealPathName = RealPathName.str(); + if (UFE.File) { +if (auto Path = UFE.File->getName()) { -

[PATCH] D51159: [FileManager] Do not call 'real_path' in getFile().

2018-08-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Basic/FileManager.cpp:319 - SmallString<128> RealPathName; - if (!FS->getRealPath(InterndFileName, RealPathName)) -UFE.RealPathName = RealPathName.str(); + if (UFE.File) { +if (auto Path = UFE.File->getName()) { -

[PATCH] D51178: [ASTImporter] Add test for importing anonymous namespaces.

2018-08-23 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor created this revision. Herald added subscribers: cfe-commits, martong. Herald added a reviewer: a.sidorin. Repository: rC Clang https://reviews.llvm.org/D51178 Files: test/Import/cxx-anon-namespace/Inputs/F.cpp test/Import/cxx-anon-namespace/test.cpp Index: test/Import/cxx-anon

[PATCH] D51177: [DEBUGINFO] Add support for emission of the debug directives only.

2018-08-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: echristo. Herald added subscribers: JDevlieghere, fedor.sergeev, aprantl. Added option -glineinfo-only to support emission of the debug directives only. It behaves very similar to -gline-tables-only, except that it sets llvm debug info emiss

[PATCH] D51159: [FileManager] Do not call 'real_path' in getFile().

2018-08-23 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: lib/Basic/FileManager.cpp:319 - SmallString<128> RealPathName; - if (!FS->getRealPath(InterndFileName, RealPathName)) -UFE.RealPathName = RealPathName.str(); + if (UFE.File) { +if (auto Path = UFE.File->getName()) { -

[PATCH] D47757: [Sema] Produce diagnostics when unavailable aligned allocation/deallocation functions are called

2018-08-23 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I've confirmed that the patch does not break anything in our CUDA code, so it's good to go as far as CUDA is concerned. I'll fix the exposed CUDA issue in a separate patch. Repository: rC Clang https://reviews.llvm.org/D47757 _

r340559 - [docs] Regenerate ClangCommandLineReference.rst

2018-08-23 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Aug 23 10:55:03 2018 New Revision: 340559 URL: http://llvm.org/viewvc/llvm-project?rev=340559&view=rev Log: [docs] Regenerate ClangCommandLineReference.rst Modified: cfe/trunk/docs/ClangCommandLineReference.rst Modified: cfe/trunk/docs/ClangCommandLineReference.rst

r340558 - [options] Document -(static|shared)-libsan

2018-08-23 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Aug 23 10:54:48 2018 New Revision: 340558 URL: http://llvm.org/viewvc/llvm-project?rev=340558&view=rev Log: [options] Document -(static|shared)-libsan Modified: cfe/trunk/include/clang/Driver/Options.td Modified: cfe/trunk/include/clang/Driver/Options.td URL: http:

[PATCH] D51159: [FileManager] Do not call 'real_path' in getFile().

2018-08-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: lib/Basic/FileManager.cpp:319 - SmallString<128> RealPathName; - if (!FS->getRealPath(InterndFileName, RealPathName)) -UFE.RealPathName = RealPathName.str(); + if (UFE.File) { +if (auto Path = UFE.File->getName()) { -

r340552 - Driver: Enable address-significance tables by default when targeting COFF.

2018-08-23 Thread Peter Collingbourne via cfe-commits
Author: pcc Date: Thu Aug 23 10:43:29 2018 New Revision: 340552 URL: http://llvm.org/viewvc/llvm-project?rev=340552&view=rev Log: Driver: Enable address-significance tables by default when targeting COFF. Differential Revision: https://reviews.llvm.org/D51049 Modified: cfe/trunk/lib/Driver/T

[PATCH] D51049: Driver: Enable address-significance tables by default when targeting COFF.

2018-08-23 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340552: Driver: Enable address-significance tables by default when targeting COFF. (authored by pcc, committed by ). Changed prior to commit: https://reviews.llvm.org/D51049?vs=161763&id=162232#toc Rep

[PATCH] D51061: [clang-tidy] abseil-str-cat-append

2018-08-23 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 162231. https://reviews.llvm.org/D51061 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/StrCatAppendCheck.cpp clang-tidy/abseil/StrCatAppendCheck.h docs/ReleaseNotes.rst docs/clang-tidy/checks/abseil

[PATCH] D51061: [clang-tidy] abseil-str-cat-append

2018-08-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-str-cat-append.rst:11 + + a = StrCat(a, b); // Use StrAppend(&a, b) instead. + Please add namespace. https://reviews.llvm.org/D51061

[PATCH] D51061: [clang-tidy] abseil-str-cat-append

2018-08-23 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg added a comment. Let me know if there's anything else I can fix to move the process along. https://reviews.llvm.org/D51061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51159: [FileManager] Do not call 'real_path' in getFile().

2018-08-23 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: lib/Basic/FileManager.cpp:319 - SmallString<128> RealPathName; - if (!FS->getRealPath(InterndFileName, RealPathName)) -UFE.RealPathName = RealPathName.str(); + if (UFE.File) { +if (auto Path = UFE.File->getName()) { -

[PATCH] D50962: [clangd] Speculative code completion index request before Sema is run.

2018-08-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 162224. ioeric added a comment. - another minior cleanup Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50962 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/TUScheduler.h

[PATCH] D50962: [clangd] Speculative code completion index request before Sema is run.

2018-08-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/ClangdServer.cpp:159 + } + if (SpecFuzzyReq) { +if (auto Filter = speculateCompletionFilter(Content, Pos)) { ilya-biryukov wrote: > NIT: maybe invert condition to reduce nesting? It would become something lik

[PATCH] D50962: [clangd] Speculative code completion index request before Sema is run.

2018-08-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 16. ioeric added a comment. - minor cleanup Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50962 Files: clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/CodeComplete.cpp clangd/CodeComplete.h clangd/TUScheduler.h clangd/i

[PATCH] D51132: [clang-tidy] abseil-redundant-strcat-calls-check

2018-08-23 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 162223. https://reviews.llvm.org/D51132 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/RedundantStrcatCallsCheck.cpp clang-tidy/abseil/RedundantStrcatCallsCheck.h docs/ReleaseNotes.rst docs/clang-ti

[PATCH] D50962: [clangd] Speculative code completion index request before Sema is run.

2018-08-23 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 162221. ioeric marked 5 inline comments as done. ioeric added a comment. Herald added subscribers: jfb, javed.absar. - Moved most logic into CodeComplete.cc Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D50962 Files: clangd/ClangdServer.cp

[PATCH] D51132: [clang-tidy] abseil-redundant-strcat-calls-check

2018-08-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-redundant-strcat-calls.rst:16 + + string s = absl::StrCat("A", absl::StrCat("B", absll::StrCat("C", "D"))); + string s = absl::StrCat("A", "B", "C", "D"); std::string

[PATCH] D51132: [clang-tidy] abseil-redundant-strcat-calls-check

2018-08-23 Thread Hugo Gonzalez via Phabricator via cfe-commits
hugoeg updated this revision to Diff 162219. https://reviews.llvm.org/D51132 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/abseil/CMakeLists.txt clang-tidy/abseil/RedundantStrcatCallsCheck.cpp clang-tidy/abseil/RedundantStrcatCallsCheck.h docs/ReleaseNotes.rst docs/clang-ti

[PATCH] D50892: [analyzer][UninitializedObjectChecker] Correct dynamic type is acquired for record pointees

2018-08-23 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp:187-191 // If FR is a pointer pointing to a non-primitive type. if (Optional RecordV = DerefdV.getAs()) { const TypedValueRegion *R = Rec

[PATCH] D50617: [ASTMatchers] Let hasObjectExpression also support UnresolvedMemberExpr, CXXDependentScopeMemberExpr

2018-08-23 Thread Shuai Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC340547: [ASTMatchers] Let hasObjectExpression also support UnresolvedMemberExpr… (authored by shuaiwang, committed by ). Changed prior to commit: https://reviews.llvm.org/D50617?vs=161830&id=162218#toc

r340547 - [ASTMatchers] Let hasObjectExpression also support UnresolvedMemberExpr, CXXDependentScopeMemberExpr

2018-08-23 Thread Shuai Wang via cfe-commits
Author: shuaiwang Date: Thu Aug 23 10:16:06 2018 New Revision: 340547 URL: http://llvm.org/viewvc/llvm-project?rev=340547&view=rev Log: [ASTMatchers] Let hasObjectExpression also support UnresolvedMemberExpr, CXXDependentScopeMemberExpr Reviewers: aaron.ballman Subscribers: cfe-commits Differe

[PATCH] D51132: [clang-tidy] abseil-redundant-strcat-calls-check

2018-08-23 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/abseil-redundant-strcat-calls.rst:16 + + string s = StrCat("A", StrCat("B", StrCat("C", "D"))); + ==> string s = StrCat("A", "B", "C", "D"); Please add namespaces and use empty l

[PATCH] D51172: [libcxx] Comment out #define __cpp_lib_node_extract, we only support half of that functionality

2018-08-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. Landed as r340544. @hans: Can you cherry-pick? Repository: rCXX libc++ https://reviews.llvm.org/D51172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D51084: Implement -Watomic-implicit-seq-cst

2018-08-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaChecking.cpp:4924 +<< Callee->getSourceRange(); + } + Why is the diagnostic at the end location? And why are you separately checking whether it's ignored at the begin location?

[PATCH] D51172: [libcxx] Comment out #define __cpp_lib_node_extract, we only support half of that functionality

2018-08-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCXX340544: Comment out #define __cpp_lib_node_extract, we only support half of that… (authored by epilk, committed by ). Changed prior to commit: https://reviews.llvm.org/D51172?vs=162208&id=162215#toc

[libcxx] r340544 - Comment out #define __cpp_lib_node_extract, we only support half of that functionality

2018-08-23 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Thu Aug 23 10:08:02 2018 New Revision: 340544 URL: http://llvm.org/viewvc/llvm-project?rev=340544&view=rev Log: Comment out #define __cpp_lib_node_extract, we only support half of that functionality Differential revision: https://reviews.llvm.org/D51172 Modified: libcxx/

[PATCH] D51172: [libcxx] Comment out #define __cpp_lib_node_extract, we only support half of that functionality

2018-08-23 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision. ldionne added a comment. This revision is now accepted and ready to land. LGTM. Don't forget to update https://reviews.llvm.org/D48896 so it uncomments this. Also, this should be merged into LLVM 7. Repository: rCXX libc++ https://reviews.llvm.org/D51172 __

[PATCH] D51172: [libcxx] Comment out #define __cpp_lib_node_extract, we only support half of that functionality

2018-08-23 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: ldionne, mclow.lists, hans. Herald added a reviewer: EricWF. Herald added subscribers: dexonsmith, christof. The other half of this is in https://reviews.llvm.org/D48896, so we shouldn't claim that we support this feature. Th

[PATCH] D50845: [CUDA/OpenMP] Define only some host macros during device compilation

2018-08-23 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. The discussion kind of moved away from the original patch, probably because the problem is larger than the defition of some host macros. However I still think that this patch improves the situation. Repository: rC Clang https://reviews.llvm.org/D50845 __

[PATCH] D50892: [analyzer][UninitializedObjectChecker] Correct dynamic type is acquired for record pointees

2018-08-23 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 162205. Szelethus added a comment. Rebased to https://reviews.llvm.org/D51057. https://reviews.llvm.org/D50892 Files: lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedPointee.cpp test/Analysis/cxx-uninitialized-object-inheritance.cpp Ind

  1   2   >