[PATCH] D44970: [XRay][clang] Add flag to choose instrumentation bundles

2018-03-27 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris created this revision. dberris added reviewers: echristo, kpw, eizan, pelikan. This change addresses http://llvm.org/PR36926 by allowing users to pick which instrumentation bundles to use, when instrumenting with XRay. In particular, the flag `-fxray-instrumentation-bundle=` has four

[PATCH] D44888: [RISCV] Default enable linker relaxation and add -mrelax, -mno-relax flags

2018-03-27 Thread Shiva Chen via Phabricator via cfe-commits
shiva0217 updated this revision to Diff 140038. shiva0217 retitled this revision from "[RISCV] Default enable linker relaxation and add -mno-relax flag to disable it" to "[RISCV] Default enable linker relaxation and add -mrelax, -mno-relax flags". shiva0217 edited the summary of this revision.

r328688 - Fix some handling of AST nodes with diagnostics.

2018-03-27 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Tue Mar 27 21:16:13 2018 New Revision: 328688 URL: http://llvm.org/viewvc/llvm-project?rev=328688=rev Log: Fix some handling of AST nodes with diagnostics. The diagnostic system for Clang can already handle many AST nodes. Instead of converting them to strings first, just

[PATCH] D44968: [ObjC] Generalize NRVO to cover non-trivial C structs

2018-03-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Is it possible to just do this for all structs? I don't think it hurts anything to do it for structs that are trivial and returned indirectly, and it would certainly be nice to construct C return values in-place even if they're guilty of nothing more than being,

[PATCH] D44968: [ObjC] Generalize NRVO to cover non-trivial C structs

2018-03-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: rjmccall, doug.gregor, rsmith. r326307 and r327870 made changes that allowed using non-trivial C structs with fields qualified with __strong or __weak. This commit generalizes NRVO, which could only be applied to C++ structs, to cover

[PATCH] D43764: [clang-apply-replacements] Convert tooling::Replacements to tooling::AtomicChange for conflict resolving of changes, code cleanup, and code formatting.

2018-03-27 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm Comment at: clang-apply-replacements/include/clang-apply-replacements/Tooling/ApplyReplacements.h:75 +/// \brief Deduplicate, check for conflicts, and convert all

[PATCH] D44865: [libc++] Implement P0608R1 - A sane variant converting constructor

2018-03-27 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 140029. lichray added a comment. Macro-free Repository: rCXX libc++ https://reviews.llvm.org/D44865 Files: include/variant test/std/utilities/variant/variant.variant/variant.assign/T.pass.cpp

[PATCH] D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency

2018-03-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. This revision is now accepted and ready to land. Comment at: include/clang/Sema/Sema.h:3827 bool isCopyElisionCandidate(QualType ReturnType, const VarDecl *VD, - bool

[PATCH] D44921: [PowerPC] Option for secure plt mode

2018-03-27 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. I'll let Justin give the actual ACK, but this looks fine to me. The only question that I have (since I don't know anything about secure PLT) is whether this is a PPC-specific thing (since the option is a PPC option). Comment at:

[PATCH] D44931: [WebAssembly] Use Windows EH instructions for Wasm EH

2018-03-27 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added inline comments. Comment at: lib/CodeGen/CGCXXABI.h:610 +struct CatchRetScope final : EHScopeStack::Cleanup { + llvm::CatchPadInst *CPI; Should be `public`? Comment at: lib/CodeGen/CGCleanup.h:630 static const EHPersonality

[PATCH] D44913: [ObjC] Enable using C++ triviality type traits for non-trivial C structs

2018-03-27 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328680: [ObjC] Make C++ triviality type traits available to non-trivial C (authored by ahatanak, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D44913: [ObjC] Enable using C++ triviality type traits for non-trivial C structs

2018-03-27 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328680: [ObjC] Make C++ triviality type traits available to non-trivial C (authored by ahatanak, committed by ). Repository: rC Clang https://reviews.llvm.org/D44913 Files:

[PATCH] D44801: Add the -fsanitize=shadow-call-stack flag

2018-03-27 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc accepted this revision. kcc added a comment. LGTM modulo prolog vs prlogue and epilog vs epilogue https://en.wiktionary.org/wiki/epilog says these are alternative spellings, so up to you. Comment at: docs/ShadowCallStack.rst:14 +buffer overflows. It works by saving a

r328680 - [ObjC] Make C++ triviality type traits available to non-trivial C

2018-03-27 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Mar 27 17:12:08 2018 New Revision: 328680 URL: http://llvm.org/viewvc/llvm-project?rev=328680=rev Log: [ObjC] Make C++ triviality type traits available to non-trivial C structs. r326307 and r327870 made changes that allowed using non-trivial C structs with fields

[PATCH] D43667: [clang-doc] Implement a YAML generator

2018-03-27 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 140021. juliehockett added a comment. Updating to for adjustments to the internal representation & cleaning up duplication. https://reviews.llvm.org/D43667 Files: clang-doc/CMakeLists.txt clang-doc/Representation.h

[PATCH] D44948: Add diagnostic -Waggregate-ctors, "aggregate type has user-declared constructors"

2018-03-27 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone planned changes to this revision. Quuxplusone added a comment. This is related to an upcoming C++ paper, definitely not ready for prime time (e.g. no tests), and quite possibly never will be ready (although if people thought it would be useful, I'd be happy to clean it up and add

[PATCH] D44948: Add diagnostic -Waggregate-ctors, "aggregate type has user-declared constructors"

2018-03-27 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention new diagnostics in documentation and Release Notes. Repository: rC Clang https://reviews.llvm.org/D44948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D41938: [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)

2018-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. This looks good with a super tiny nit regarding comments about signed integers. George, are you happy with the changes? (: Comment at:

[PATCH] D44901: [Diag] Avoid emitting a redefinition note if no location is available.

2018-03-27 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D44901 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44964: Change order of libclang_rt.profile link for freebsd

2018-03-27 Thread Tom Rix via Phabricator via cfe-commits
trixirt created this revision. trixirt added reviewers: emaste, rsmith. Herald added a subscriber: cfe-commits. clang -static -coverage foo.c fails because the -lclang_rt.profile-*.a has a dependency on libc but is placed after libc in the link line. This change place -lclang_rt.profile before

[PATCH] D44765: PR36643 Make clang-format support more generic TMarcos

2018-03-27 Thread Teodor Petrov via Phabricator via cfe-commits
obfuscated marked an inline comment as done. obfuscated added inline comments. Comment at: lib/Format/FormatToken.h:138 + /// \brief Whether this is a string literal similar to _T("sdfsdf"). + bool TMacroStringLiteral = false; + krasimir wrote: > We don't

[PATCH] D44931: [WebAssembly] Use Windows EH instructions for Wasm EH

2018-03-27 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. Some quick first pass comments. Comment at: lib/CodeGen/CGCleanup.cpp:985 +// does not have a runtime support for that. +if (!Personality.usesFuncletPads() || Personality.isWasmPersonality()) { + EHStack.pushTerminate();

[PATCH] D44947: [Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizers

2018-03-27 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328672: [Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizers (authored by phosek, committed by ). Changed prior to commit: https://reviews.llvm.org/D44947?vs=139978=140007#toc

r328672 - [Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizers

2018-03-27 Thread Petr Hosek via cfe-commits
Author: phosek Date: Tue Mar 27 14:33:12 2018 New Revision: 328672 URL: http://llvm.org/viewvc/llvm-project?rev=328672=rev Log: [Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizers This is needed in addition to fuzzer in order to use libFuzzer. Differential Revision:

[PATCH] D42938: [Sema] Emit -Winteger-overflow for arguments in function calls, ObjC messages.

2018-03-27 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328671: [Sema] Emit -Winteger-overflow for arguments in function calls, ObjC messages. (authored by vsapsai, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r328671 - [Sema] Emit -Winteger-overflow for arguments in function calls, ObjC messages.

2018-03-27 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Tue Mar 27 14:29:05 2018 New Revision: 328671 URL: http://llvm.org/viewvc/llvm-project?rev=328671=rev Log: [Sema] Emit -Winteger-overflow for arguments in function calls, ObjC messages. rdar://problem/35539384 Reviewers: ahatanak, nicholas, rsmith, jkorous-apple Reviewed

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. The index changes are moved here: https://reviews.llvm.org/D44954 I haven't changed the patch yet though, I just removed it from this one. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 ___

[PATCH] D44954: [clangd] [RFC] Add more symbols to the index

2018-03-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle planned changes to this revision. malaperle added inline comments. Comment at: clangd/index/Index.h:142 + // Whether or not the symbol should be considered for completion. + bool ForCompletion = false; /// A brief description of the symbol that can be displayed in

[PATCH] D44955: [CFG] [analyzer] Work around a disappearing CXXBindTemporaryExpr.

2018-03-27 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet. Herald added subscribers: cfe-commits, rnkovacs. This is a CFG-side patch for the weird AST i encountered in http://lists.llvm.org/pipermail/cfe-dev/2018-March/057398.html . The omission

[PATCH] D44954: [clangd] [RFC] Add more symbols to the index

2018-03-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, MaskRay, ioeric, jkorous-apple, ilya-biryukov, klimek. This adds more symbols to the index: - member variables and functions - symbols in main files - enum constants in scoped enums This is a WIP meant as a starting point

r328663 - [coroutines] Do not attempt to typo-correct when coroutine is looking for required members

2018-03-27 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Tue Mar 27 13:38:19 2018 New Revision: 328663 URL: http://llvm.org/viewvc/llvm-project?rev=328663=rev Log: [coroutines] Do not attempt to typo-correct when coroutine is looking for required members When SemaCoroutine looks for await_resume, it means it. No need for

[PATCH] D42034: [clang-format] In tests, expected code should be format-stable

2018-03-27 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir requested changes to this revision. krasimir added a comment. This revision now requires changes to proceed. Thank you! If this works, we should apply it to all files in `unittest/Format`. Repository: rC Clang https://reviews.llvm.org/D42034

[PATCH] D44947: [Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizers

2018-03-27 Thread Roland McGrath via Phabricator via cfe-commits
mcgrathr accepted this revision. mcgrathr added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang https://reviews.llvm.org/D44947 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44765: PR36643 Make clang-format support more generic TMarcos

2018-03-27 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I don't have preferences over names, but I agree with Alex that the option should have more detailed description. Comment at: lib/Format/FormatToken.h:138 + /// \brief Whether this is a string literal similar to _T("sdfsdf"). + bool

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clangd/tool/ClangdMain.cpp:105 +static llvm::cl::opt LimitWorkspaceSymbolResult( +"workspace-symbol-limit", malaperle wrote: > sammccall wrote: > > the -completion-limit was mostly to control rollout, I'm not sure

[PATCH] D44927: Enable msan unconditionally on Linux

2018-03-27 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a subscriber: kcc. eugenis added a comment. I too find these checks arbitrary and pointless. @kcc ? Repository: rC Clang https://reviews.llvm.org/D44927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44747: Set calling convention for CUDA kernel

2018-03-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaOverload.cpp:1492 + Changed = true; +} + yaxunl wrote: > rjmccall wrote: > > It's cheaper not to check the CUDA language mode here; pulling the CC out > > of the FPT is easy. > > > > Why is this

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-27 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Have you considered also allowing '.' and ' ' (space) as separators in the > request? Having additional separators doesn't really hurt complexity of the > implementation, but allows to switch between tools for different languages > easier. I would suggest allowing

[PATCH] D44747: Set calling convention for CUDA kernel

2018-03-27 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: lib/Sema/SemaOverload.cpp:1492 + Changed = true; +} + rjmccall wrote: > It's cheaper not to check the CUDA language mode here; pulling the CC out of > the FPT is easy. >

[PATCH] D44948: Add diagnostic -Waggregate-ctors, "aggregate type has user-declared constructors"

2018-03-27 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone created this revision. Herald added a subscriber: cfe-commits. This new warning diagnoses any aggregate class/struct/union type which has user-declared constructors, in order to test the hypothesis that real code does not (intentionally) contain such animals. If no real

[PATCH] D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.

2018-03-27 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 139981. vsapsai added a comment. - More tweaks. Remove MultiSourceLocation as nobobody, including me, sees much value in it. https://reviews.llvm.org/D44589 Files: clang/include/clang/Basic/CharInfo.h clang/include/clang/Sema/DelayedDiagnostic.h

r328657 - AMDGPU: Update datalayout for stack alignment

2018-03-27 Thread Matt Arsenault via cfe-commits
Author: arsenm Date: Tue Mar 27 12:26:51 2018 New Revision: 328657 URL: http://llvm.org/viewvc/llvm-project?rev=328657=rev Log: AMDGPU: Update datalayout for stack alignment Modified: cfe/trunk/lib/Basic/Targets/AMDGPU.cpp cfe/trunk/test/CodeGen/target-data.c

[PATCH] D44947: [Driver] Add fuzzer-no-link into the list of supported Fuchsia sanitizers

2018-03-27 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: mcgrathr, aarongreen. Herald added a subscriber: cfe-commits. This is needed in addition to fuzzer in order to use libFuzzer. Repository: rC Clang https://reviews.llvm.org/D44947 Files: clang/lib/Driver/ToolChains/Fuchsia.cpp Index:

[PATCH] D44330: CMake option to allow enabling experimental new pass manager by default

2018-03-27 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/CMakeLists.txt:215 +set(ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER FALSE CACHE BOOL + "Enable the experimental new pass manager by default.") chandlerc wrote: > Does it make sense to put the word `DEFAULT` into the

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-03-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-doc/BitcodeWriter.h:129 // Check that the static size is large-enough. assert(Record.capacity() > BitCodeConstants::RecordSize); } juliehockett wrote: > lebedev.ri wrote: > > Isn't that the

[PATCH] D44723: Set dso_local when clearing dllimport

2018-03-27 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. lgtm I'd add more tests but I can't think of ways to remove the dll attributes, only to flip them. Do we already have dso_local tests for this similar case: __declspec(dllimport) void f();

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-03-27 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett added inline comments. Comment at: clang-doc/BitcodeReader.cpp:27 + assert(Record[0] == 20); + for (int I = 0, E = Record[0]; I < E; ++I) +Field[I] = Record[I + 1]; lebedev.ri wrote: > Ok, i don't understand what is going on here. > Where is

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-03-27 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 139972. juliehockett marked 4 inline comments as done. juliehockett added a comment. Small fixes to address comments https://reviews.llvm.org/D43341 Files: clang-doc/BitcodeReader.cpp clang-doc/BitcodeReader.h clang-doc/BitcodeWriter.cpp

[PATCH] D44842: Add Parameters to DW_AT_name Attribute of Template Variables

2018-03-27 Thread Matthew Voss via Phabricator via cfe-commits
ormris added inline comments. Comment at: lib/CodeGen/CGDebugInfo.cpp:2992 + std::string NameString = Name.str(); + llvm::raw_string_ostream ParameterizedName(NameString); + ParameterizedName << "<"; JDevlieghere wrote: > Why not use Name.str()

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle updated this revision to Diff 139968. malaperle marked 4 inline comments as done. malaperle added a comment. Split the patch so that this part only has the workspace/symbol part and the index model will be updated separately. Repository: rCTE Clang Tools Extra

[PATCH] D44916: [Sema] Avoid crash for category implementation without interface

2018-03-27 Thread Shoaib Meenai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328654: [Sema] Avoid crash for category implementation without interface (authored by smeenai, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-03-27 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle marked 9 inline comments as done. malaperle added a comment. In https://reviews.llvm.org/D44882#1048355, @sammccall wrote: > Can we split this patch up (it's pretty large anyway) and land the > `workspaceSymbols` implementation first, without changing the indexer > behavior? > > I

r328654 - [Sema] Avoid crash for category implementation without interface

2018-03-27 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Tue Mar 27 11:58:28 2018 New Revision: 328654 URL: http://llvm.org/viewvc/llvm-project?rev=328654=rev Log: [Sema] Avoid crash for category implementation without interface When we have a category implementation without a corresponding interface (which is an error by

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-03-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. It's surprisingly difficult to review this :/ Just by itself the logic is simple, but the amount of blocks/records/record types is kinda demoralizing. I really hope it will be possible to somehow tablegen this later. Comment at:

[PATCH] D43871: [modules] No longer include stdlib.h from mm_malloc.h.

2018-03-27 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor updated this revision to Diff 139963. teemperor added a comment. - Added more test cases for reverse include order and clang modules. https://reviews.llvm.org/D43871 Files: lib/Headers/mm_malloc.h lib/Sema/SemaExceptionSpec.cpp

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-03-27 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @koldaniel Have you evaluated this checker? On which codebases? Were the warnings real security issues, or were they mostly spurious? The code seems fine, but I'm not sure whether it should be in `security` or in `alpha`. https://reviews.llvm.org/D35068

[PATCH] D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency

2018-03-27 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 139961. Quuxplusone edited the summary of this revision. Quuxplusone added a comment. Rebased on master. AFAIK this is ready to go and I just need someone to land it for me... @rtrieu ping? I believe the PR summary would be suitable as a commit

[PATCH] D44888: [RISCV] Default enable linker relaxation and add -mno-relax flag to disable it

2018-03-27 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: include/clang/Driver/Options.td:1874 +def mno_relax : Flag<["-"], "mno-relax">, +Group; I think we should define both -mrelax and -mno-relax flags Comment at:

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExpr.cpp:12093 +break; + } + I think doing this here can result in double-warning if the overload resolves to a builtin operator. Now, it might not actually be possible for that to combine with the

Re: [clang-tools-extra] r328500 - [clangd] Support incremental document syncing

2018-03-27 Thread Reid Kleckner via cfe-commits
One of these new tests does not pass on Windows due to assumptions about absolute path structure. The FileCheck output seems self-explanatory: $ "FileCheck" "-strict-whitespace"

[clang-tools-extra] r328645 - Attempt to fix clangd test on Windows by wildcarding drive letters

2018-03-27 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Tue Mar 27 10:44:12 2018 New Revision: 328645 URL: http://llvm.org/viewvc/llvm-project?rev=328645=rev Log: Attempt to fix clangd test on Windows by wildcarding drive letters Modified: clang-tools-extra/trunk/test/clangd/textdocument-didchange-fail.test Modified:

[PATCH] D33844: [clang-tidy] terminating continue check

2018-03-27 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: test/clang-tidy/misc-terminating-continue.cpp:7 +// CHECK-MESSAGES: :[[@LINE-1]]:5: warning: terminating 'continue' [misc-terminating-continue] + } while(false); + Quuxplusone wrote: > I initially expected to

[PATCH] D44727: [RISCV] Implement getTargetDefines, handleTargetFeatures and hasFeature for RISCVTargetInfo

2018-03-27 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: test/Preprocessor/riscv-target-features.c:9 + +// RUN: %clang -target riscv32-unknown-linux-gnu -march=rv32im -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-M-EXT %s +// RUN: %clang -target riscv64-unknown-linux-gnu -march=rv64im

[PATCH] D44815: [AArch64]: Add support for parsing rN registers.

2018-03-27 Thread Peter Smith via Phabricator via cfe-commits
peter.smith added a comment. Thanks for the clarification. With that in mind I'm much less concerned that adding "r" as an alias will make extra warnings more difficult. I agree that there should be at least a warning for register long x asm ("wn") although that is separate from this patch.

[PATCH] D44189: [RISCV] Verify the input value of -march=

2018-03-27 Thread Ana Pazos via Phabricator via cfe-commits
apazos added inline comments. Comment at: lib/Driver/ToolChains/Arch/RISCV.cpp:51 + break; +case 'g': + // g = imafd One more question - how about non-standard extensions (vendor/custom) prefixed with X? Shouldn't we add the logic to process

[PATCH] D44788: Add an option to support debug fission on implicit ThinLTO.

2018-03-27 Thread Yunlian Jiang via Phabricator via cfe-commits
yunlian updated this revision to Diff 139956. https://reviews.llvm.org/D44788 Files: docs/ClangCommandLineReference.rst include/clang/Driver/Options.td lib/Driver/ToolChains/CommonArgs.cpp test/Driver/lto-dwo.c Index: lib/Driver/ToolChains/CommonArgs.cpp

r328641 - Update test after r328635 in LLVM

2018-03-27 Thread Krzysztof Parzyszek via cfe-commits
Author: kparzysz Date: Tue Mar 27 10:17:39 2018 New Revision: 328641 URL: http://llvm.org/viewvc/llvm-project?rev=328641=rev Log: Update test after r328635 in LLVM Modified: cfe/trunk/test/CodeGen/alias.c Modified: cfe/trunk/test/CodeGen/alias.c URL:

[PATCH] D37115: [coroutines] Do not attempt to typo-correct when coroutine is looking for required members

2018-03-27 Thread Brian Gesiak via Phabricator via cfe-commits
modocache accepted this revision. modocache added a comment. This revision is now accepted and ready to land. Excellent, thanks! https://reviews.llvm.org/D37115 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33844: [clang-tidy] terminating continue check

2018-03-27 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 139953. https://reviews.llvm.org/D33844 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/TerminatingContinueCheck.cpp clang-tidy/misc/TerminatingContinueCheck.h docs/clang-tidy/checks/list.rst

[PATCH] D44559: [Sema] Wrong width of result of mul operation

2018-03-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D44559#1049049, @avt77 wrote: > > If that operation overflows, so be it — we're not going to warn about the > > potential for overflow every time the user adds two ints, and by the same > > token, it doesn't make any sense to warn about

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-03-27 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 139948. lebedev.ri retitled this revision from "[Sema] Extend -Wself-assign with -Wself-assign-overloaded to warn on overloaded self-assignment (classes)" to "[Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment

r328636 - [clang] Change std::sort to llvm::sort in response to r327219

2018-03-27 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Tue Mar 27 09:50:00 2018 New Revision: 328636 URL: http://llvm.org/viewvc/llvm-project?rev=328636=rev Log: [clang] Change std::sort to llvm::sort in response to r327219 r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help

[PATCH] D44908: [ObjC++] Make parameter passing and function return compatible with ObjC

2018-03-27 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. Repository: rC Clang https://reviews.llvm.org/D44908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44826: Add -Wunused-using, a warning that finds unused using declarations.

2018-03-27 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. You mention a missed case in the description - where the target of a using decl is used and that causes the unused-using not to warn about the using decl? That seems like a big limitation. Does that mean the 'used' bit is being tracked in the wrong place, on the

[PATCH] D44916: [Sema] Avoid crash for category implementation without interface

2018-03-27 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think that's a fine place to add the check. Repository: rC Clang https://reviews.llvm.org/D44916 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-03-27 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. Do you have any other comments, or could this change be accepted? https://reviews.llvm.org/D35068 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44906: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer

2018-03-27 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added inline comments. Comment at: clang-tidy/ClangTidy.cpp:490 +CommandLineArguments AdjustedArgs = Args; +AdjustedArgs.emplace_back("-D__clang_analyzer__"); +return AdjustedArgs; alexfh wrote: > I wonder whether we should

[PATCH] D44906: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer

2018-03-27 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/ClangTidy.cpp:490 +CommandLineArguments AdjustedArgs = Args; +AdjustedArgs.emplace_back("-D__clang_analyzer__"); +return AdjustedArgs; I wonder whether we should instead reuse the logic

[PATCH] D44908: [ObjC++] Make parameter passing and function return compatible with ObjC

2018-03-27 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 139935. ahatanak added a comment. Make ClangABICompat a LangOption and remove ForcePassIndirectly. Move the logic in CodeGen that decides whether a parameter should be passed indirectly to Sema. Repository: rC Clang https://reviews.llvm.org/D44908

[PATCH] D44831: [clang-format] Refine ObjC guesser to handle child lines of child lines

2018-03-27 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328628: [clang-format] Refine ObjC guesser to handle child lines of child lines (authored by benhamilton, committed by ). Changed prior to commit: https://reviews.llvm.org/D44831?vs=139929=139932#toc

[PATCH] D44816: [clang-format] Do not insert space before closing brace in ObjC dict literal

2018-03-27 Thread Ben Hamilton via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC328627: [clang-format] Do not insert space before closing brace in ObjC dict literal (authored by benhamilton, committed by ). Changed prior to commit:

[PATCH] D44816: [clang-format] Do not insert space before closing brace in ObjC dict literal

2018-03-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added a comment. I filed https://bugs.llvm.org/show_bug.cgi?id=36919 to follow up and make ObjC dictionary literal spacing consistent with ObjC array literals. Repository: rC Clang https://reviews.llvm.org/D44816 ___ cfe-commits

r328627 - [clang-format] Do not insert space before closing brace in ObjC dict literal

2018-03-27 Thread Ben Hamilton via cfe-commits
Author: benhamilton Date: Tue Mar 27 08:01:17 2018 New Revision: 328627 URL: http://llvm.org/viewvc/llvm-project?rev=328627=rev Log: [clang-format] Do not insert space before closing brace in ObjC dict literal Summary: Previously, `clang-format` would sometimes insert a space before the closing

r328628 - [clang-format] Refine ObjC guesser to handle child lines of child lines

2018-03-27 Thread Ben Hamilton via cfe-commits
Author: benhamilton Date: Tue Mar 27 08:01:21 2018 New Revision: 328628 URL: http://llvm.org/viewvc/llvm-project?rev=328628=rev Log: [clang-format] Refine ObjC guesser to handle child lines of child lines Summary: This fixes an issue brought up by djasper@ in his review of D44790. We handled

r328626 - Drop spurious break; NFC

2018-03-27 Thread Sven van Haastregt via cfe-commits
Author: svenvh Date: Tue Mar 27 07:57:56 2018 New Revision: 328626 URL: http://llvm.org/viewvc/llvm-project?rev=328626=rev Log: Drop spurious break; NFC Modified: cfe/trunk/lib/Sema/SemaChecking.cpp Modified: cfe/trunk/lib/Sema/SemaChecking.cpp URL:

[PATCH] D44816: [clang-format] Do not insert space before closing brace in ObjC dict literal

2018-03-27 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. Yeah, it's one of these things where neither way would be totally intuitive to everyone. Repository: rC Clang https://reviews.llvm.org/D44816 ___ cfe-commits mailing list

[PATCH] D44831: [clang-format] Refine ObjC guesser to handle child lines of child lines

2018-03-27 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. Repository: rC Clang https://reviews.llvm.org/D44831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44816: [clang-format] Do not insert space before closing brace in ObjC dict literal

2018-03-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:2484 + if (Right.is(tok::r_brace) && Right.MatchingParen && + Right.MatchingParen->is(TT_DictLiteral) && + Right.MatchingParen->Previous && djasper wrote: > Could you use

[PATCH] D44816: [clang-format] Do not insert space before closing brace in ObjC dict literal

2018-03-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 139930. benhamilton marked an inline comment as done. benhamilton added a comment. - Use `Right.MatchingParen->endsSequence(TT_DictLiteral, tok::at)` Repository: rC Clang https://reviews.llvm.org/D44816 Files: lib/Format/TokenAnnotator.cpp

[PATCH] D44831: [clang-format] Refine ObjC guesser to handle child lines of child lines

2018-03-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: lib/Format/Format.cpp:1449 const AdditionalKeywords ) { +for (auto Line : AnnotatedLines) + if (LineContainsObjCCode(*Line, Keywords)) djasper wrote: > I would not create a second

[PATCH] D44831: [clang-format] Refine ObjC guesser to handle child lines of child lines

2018-03-27 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton updated this revision to Diff 139929. benhamilton marked 2 inline comments as done. benhamilton added a comment. - Simplify recursion. Remove static method LineContainsObjCCode(). Repository: rC Clang https://reviews.llvm.org/D44831 Files: lib/Format/Format.cpp

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-03-27 Thread Henry Wong via Phabricator via cfe-commits
MTC created this revision. MTC added reviewers: dcoughlin, NoQ, xazax.hun, a.sidorin. Herald added subscribers: cfe-commits, rnkovacs, szepet. Herald added a reviewer: george.karpenkov. This patch originates from https://reviews.llvm.org/D31868. There are two key points in this patch: - Add

[PATCH] D44480: [Sema] Don't skip function bodies with 'auto' without trailing return type

2018-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. I hit that bug in practice a few days ago when playing around with a C++17 codebase. It makes completion totally unusable when functions with auto-deduced return type are used. @rsmith, any chance you could take a

[PATCH] D44480: [Sema] Don't skip function bodies with 'auto' without trailing return type

2018-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 139926. ilya-biryukov added a comment. - Replace auto with explicit type Repository: rC Clang https://reviews.llvm.org/D44480 Files: lib/Sema/SemaDecl.cpp test/CodeCompletion/crash-skipped-bodies-template-inst.cpp Index:

[PATCH] D44932: [CodeComplete] Fix completion in the middle of ident in ctor lists.

2018-03-27 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: sammccall, aaron.ballman, bkramer, sepavloff. The example that was broken before (^ designate completion points): class Foo { Foo() : fie^ld^() {} // no completions were provided here. int field; }; To fix it we

[PATCH] D44931: [WebAssembly] Use Windows EH instructions for Wasm EH

2018-03-27 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin updated this revision to Diff 139920. aheejin added a comment. - Comment fix Repository: rC Clang https://reviews.llvm.org/D44931 Files: lib/CodeGen/CGCXXABI.h lib/CodeGen/CGCleanup.cpp lib/CodeGen/CGCleanup.h lib/CodeGen/CGException.cpp lib/CodeGen/ItaniumCXXABI.cpp

[PATCH] D44931: [WebAssembly] Use Windows EH instructions for Wasm EH

2018-03-27 Thread Heejin Ahn via Phabricator via cfe-commits
aheejin created this revision. aheejin added reviewers: majnemer, dschuff. Herald added subscribers: cfe-commits, sunfish, jgravelle-google, sbc100, jfb. Because wasm control flow needs to be structured, using WinEH instructions to support wasm EH brings several benefits. This patch makes wasm EH

r328623 - Move a ref-counted pointer instead of copying it. NFC.

2018-03-27 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Tue Mar 27 07:02:06 2018 New Revision: 328623 URL: http://llvm.org/viewvc/llvm-project?rev=328623=rev Log: Move a ref-counted pointer instead of copying it. NFC. Modified: cfe/trunk/lib/Tooling/Tooling.cpp Modified: cfe/trunk/lib/Tooling/Tooling.cpp URL:

[clang-tools-extra] r328622 - [clang-move] Fix test failing due to clang-format change

2018-03-27 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Tue Mar 27 06:39:33 2018 New Revision: 328622 URL: http://llvm.org/viewvc/llvm-project?rev=328622=rev Log: [clang-move] Fix test failing due to clang-format change r328621 reverted the removal of empty lines before the closing `}` in namespaces. Modified:

[PATCH] D44927: Enable msan unconditionally on Linux

2018-03-27 Thread vit9696 via Phabricator via cfe-commits
vit9696 created this revision. vit9696 added a reviewer: eugenis. Herald added a subscriber: cfe-commits. Memeory sanitizer compatibility are already done in MemorySanitizer::doInitialization. It verifies whether the necessary offsets exist and bails out if not. For this reason it is no good to

  1   2   >