[PATCH] D29369: [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

2017-02-01 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 86739. vsk marked an inline comment as done. vsk added a comment. - Per Eli's comment: check that integers are actually widened, instead of incorrectly assuming they are always widened. I added some test cases for this. - Address the 'fixme' regarding

[PATCH] D20561: Warn when taking address of packed member

2017-02-02 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Yes, the project is interested on reducing the number of false positives. The example you gave is *not* a FP, but exactly the kind of situation the warning is supposed to trigger on. Repository: rL LLVM https://reviews.llvm.org/D20561

[PATCH] D28365: [Driver] Updated for Visual Studio 2017

2017-02-02 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293923: [Driver] Updated for Visual Studio 2017 (authored by rnk). Changed prior to commit: https://reviews.llvm.org/D28365?vs=86502=86865#toc Repository: rL LLVM https://reviews.llvm.org/D28365

[PATCH] D28365: [Driver] Updated for Visual Studio 2017

2017-02-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I had to revert this because it doesn't pass tests on Linux. Can you look into that and resubmit after fixing those test failures? Repository: rL LLVM https://reviews.llvm.org/D28365 ___ cfe-commits mailing list

[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

2017-02-02 Thread Mateusz Mikuła via Phabricator via cfe-commits
mati865 created this revision. mati865 added a project: clang-c. Header guards in GCC limits.h were stopping Clang from going up one more level to the system limits.h https://reviews.llvm.org/D29464 Files: lib/Driver/MinGWToolChain.cpp Index: lib/Driver/MinGWToolChain.cpp

[PATCH] D28365: [Driver] Updated for Visual Studio 2017

2017-02-02 Thread Hamza Sood via Phabricator via cfe-commits
hamzasood added a comment. In https://reviews.llvm.org/D28365#664892, @rnk wrote: > This is ready to land. Do you need someone to commit this? I think so, yeah. https://reviews.llvm.org/D28365 ___ cfe-commits mailing list

[PATCH] D29464: [MinGWToolChain] Don't use GCC headers on Win32

2017-02-02 Thread Mateusz Mikuła via Phabricator via cfe-commits
mati865 added a comment. I don't know about Linux but on Windows this code was causing issue: #include int main() { char buf[PATH_MAX]; } Include order: - Before patch: Clang limits.h (lib\\clang\\3.9.1\\include) -> GCC limits.h (lib\\gcc\\x86_64-w64-mingw32\\6.3.0\\include-fixed) here

[PATCH] D28213: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin

2017-02-03 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. In https://reviews.llvm.org/D28213#665967, @dim wrote: > I don't think FreeBSD has lock-free 64 bit atomic operations on 32-bit x86. > IIRC we already had some trouble before with clang emitting libcalls to > `__atomic_fetch_add_8` and friends, which then lead to

[PATCH] D20710: Lit C++11 Compatibility Patch #9

2017-02-03 Thread Charles Li via Phabricator via cfe-commits
tigerleapgorge updated this revision to Diff 86994. tigerleapgorge added a comment. Update again, remove 4 OpenMP tests here because they have been checked in https://reviews.llvm.org/rL294025 under review https://reviews.llvm.org/D29480. 13 tests left. https://reviews.llvm.org/D20710 Files:

[PATCH] D29506: [OpenMP] Teams reduction on the NVPTX device.

2017-02-03 Thread Arpith Jacob via Phabricator via cfe-commits
arpith-jacob added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:524 + + static bool classof(const CGOpenMPRuntime *RT) { +return RT->getKind() == RK_HOST; This is required to cast to the NVPTX runtime in a static function as follows;

[PATCH] D29038: [OpenCL] Accept logical NOT for pointer types in CL1.1

2017-02-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm accepted this revision. arsenm added a comment. This revision is now accepted and ready to land. LGTM Comment at: test/SemaOpenCL/logical-ops.cl:1-3 +// RUN: %clang_cc1 %s -verify -cl-std=CL1.1 -triple x86_64-unknown-linux-gnu +// RUN: %clang_cc1 %s -verify

[PATCH] D29393: [clang-tidy] Don't warn about call to unresolved operator*

2017-02-03 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp:63 +cxxOperatorCallExpr(argumentCountIs(1), +callee(unresolvedLookupExpr()), +hasArgument(0,

[PATCH] D29476: Driver: Do not warn about unused -pthread when linking on darwin

2017-02-02 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB added a subscriber: cfe-commits. MatzeB added a comment. Add cfe-commits. Repository: rL LLVM https://reviews.llvm.org/D29476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D28365: [Driver] Updated for Visual Studio 2017

2017-02-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Doesn't your fix mean that the tests will fail on a Windows machine that doesn't have VS because LLVM was built with mingw? Usually in these situations we provide some way to provide a fake toolchain. https://reviews.llvm.org/D28365

[PATCH] D29469: Fix PR31843: Clang-4.0 crashes/assert while evaluating __builtin_object_size

2017-02-02 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. > My concern with that approach is that we'd just end up playing whack-a-bug. > It's possible that this fix puts us in a similar situation, but I'm honestly > at a loss for a better approach. ¯\_(ツ)_/¯ (...And I'd kinda prefer to play > whack-a-bug with "clang

[PATCH] D28526: [ARM] Add diagnostics when initialization global variables with ropi/rwpi

2017-02-02 Thread Weiming Zhao via Phabricator via cfe-commits
weimingz added a comment. ping ? https://reviews.llvm.org/D28526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29151: [clang-tidy] Add misc-invalidated-iterators check.

2017-02-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D29151#662504, @zaks.anna wrote: > Before clang-tidy came into existence the guidelines were very clear. One > should write a clang warning if the diagnostic: > > - can be implemented without path-insensitive analysis (including >

[PATCH] D28213: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin

2017-02-03 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In https://reviews.llvm.org/D28213#639397, @hfinkel wrote: > LGTM. This seems consistent with what GCC does. On x86 it also sets > __GCC_ATOMIC_LLONG_LOCK_FREE to 2. Hmm, unfortunately on i386-freebsd, it does not: $ gcc6 -v Using built-in specs. COLLECT_GCC=gcc6

[PATCH] D29393: [clang-tidy] Don't warn about call to unresolved operator*

2017-02-03 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode added inline comments. Comment at: clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp:63 +cxxOperatorCallExpr(argumentCountIs(1), +callee(unresolvedLookupExpr()), +hasArgument(0,

[PATCH] D28243: [OpenMP] Add missing regression test for pragma distribute, clause firstprivate

2017-02-03 Thread Carlo Bertolli via Phabricator via cfe-commits
carlo.bertolli closed this revision. carlo.bertolli added a comment. Committed to r294026 https://reviews.llvm.org/D28243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29480: C++11 Compatibility - OpenMP constant expressions

2017-02-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294025: [Lit Test] Make tests C++11 compatible - OpenMP constant expressions (authored by lcharles). Changed prior to commit: https://reviews.llvm.org/D29480?vs=86925=86988#toc Repository: rL LLVM

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-03 Thread Paweł Żukowski via Phabricator via cfe-commits
idlecode added a comment. Standard you linked mentions portability as the reason inline assembler should be avoided. Should it really be named 'safety'? https://reviews.llvm.org/D29267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29208: Prevent ICE in dllexport class with _Atomic() data member

2017-02-01 Thread Warren Ristow via Phabricator via cfe-commits
wristow added inline comments. Comment at: lib/CodeGen/CGClass.cpp:1135 MemberExpr *ME2 = dyn_cast(RHS); -if (dyn_cast(ME2->getMemberDecl()) != Field) +if (!ME2 || dyn_cast(ME2->getMemberDecl()) != Field) return nullptr;

[PATCH] D29369: [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

2017-02-01 Thread John Regehr via Phabricator via cfe-commits
regehr added a comment. Out of curiosity, how many of these superfluous checks are not subsequently eliminated by InstCombine? https://reviews.llvm.org/D29369 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29437: [ubsan] Detect signed overflow UB in remainder operations

2017-02-01 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. Teach ubsan to diagnose remainder operations which have undefined behavior due to signed overflow. My copy of the C11 spec draft (6.5.5.6) says that: if the quotient a/b is representable, (a/b)*b + a%b shall equal a; otherwise, the behavior of both a/b and a%b is

[PATCH] D29208: Prevent ICE in dllexport class with _Atomic() data member

2017-02-01 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. Thanks, looks good. https://reviews.llvm.org/D29208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29208: Prevent ICE in dllexport class with _Atomic() data member

2017-02-01 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGClass.cpp:1135 MemberExpr *ME2 = dyn_cast(RHS); -if (dyn_cast(ME2->getMemberDecl()) != Field) +if (!ME2 || dyn_cast(ME2->getMemberDecl()) != Field) return nullptr;

[PATCH] D29208: Prevent ICE in dllexport class with _Atomic() data member

2017-02-01 Thread Warren Ristow via Phabricator via cfe-commits
wristow updated this revision to Diff 86767. wristow added a comment. Code restructured. https://reviews.llvm.org/D29208 Files: lib/CodeGen/CGClass.cpp test/CodeGenCXX/atomic-dllexport.cpp Index: test/CodeGenCXX/atomic-dllexport.cpp

[PATCH] D24933: Enable configuration files in clang

2017-02-01 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 86761. sepavloff added a comment. Herald added a subscriber: danalbert. Updated patch Use more robust algorithm to determine custom compiler prefix. Bring the code in sync with changes in llvm patch. https://reviews.llvm.org/D24933 Files:

[PATCH] D29208: Prevent ICE in dllexport class with _Atomic() data member

2017-02-01 Thread Warren Ristow via Phabricator via cfe-commits
wristow marked 2 inline comments as done. wristow added inline comments. Comment at: lib/CodeGen/CGClass.cpp:1135 MemberExpr *ME2 = dyn_cast(RHS); -if (dyn_cast(ME2->getMemberDecl()) != Field) +if (!ME2 || dyn_cast(ME2->getMemberDecl()) != Field)

[PATCH] D29437: [ubsan] Detect signed overflow UB in remainder operations

2017-02-01 Thread John Regehr via Phabricator via cfe-commits
regehr added a comment. Does this check need to be sensitive to the dialect of C/C++ that the user asked for? I know that it used to be the case that the standard could be read either way for this case, but as you observe it is now unambiguously UB. https://reviews.llvm.org/D29437

[PATCH] D29437: [ubsan] Detect signed overflow UB in remainder operations

2017-02-02 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D29437#664379, @regehr wrote: > Does this check need to be sensitive to the dialect of C/C++ that the user > asked for? I know that it used to be the case that the standard could be read > either way for this case, but as you observe it is now

[PATCH] D29384: [analyzer] Fix an assertion fail in CStringSyntaxChecker

2017-02-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293874: [analyzer] Fix an assertion fail in CStringSyntaxChecker. (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D29384?vs=86599=86773#toc Repository: rL LLVM

[PATCH] D29369: [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

2017-02-01 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In https://reviews.llvm.org/D29369#664366, @regehr wrote: > Out of curiosity, how many of these superfluous checks are not subsequently > eliminated by InstCombine? I don't have numbers from a benchmark prepped. Here's what we get with the 'ubsan-promoted-arith.cpp' test

[PATCH] D29396: [clang-format] Don't reflow lines starting with TODO, FIXME or XXX.

2017-02-02 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293878: [clang-format] Don't reflow lines starting with TODO, FIXME or XXX. (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D29396?vs=86643=86781#toc Repository: rL LLVM

[PATCH] D16135: Macro Debug Info support in Clang

2017-02-03 Thread Amjad Aboud via Phabricator via cfe-commits
aaboud updated this revision to Diff 87020. aaboud marked 4 inline comments as done. aaboud added a comment. Addressed Adrian's comments. Please, let me know if I missed any. Also, I improved the code and added explanation about the file inclusion structure that is being handled in the macro

[PATCH] D29369: [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

2017-02-03 Thread Vedant Kumar via Phabricator via cfe-commits
vsk marked an inline comment as done. vsk added a comment. In https://reviews.llvm.org/D29369#666308, @vsk wrote: > In https://reviews.llvm.org/D29369#665878, @filcab wrote: > > > Why the switch to `if` instead of a fully-covered switch/case? > > > It lets me avoid repeating two function calls:

[PATCH] D29479: Driver: Do not warn about unused -pthread when linking on darwin

2017-02-03 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB updated this revision to Diff 87024. MatzeB added a comment. Address review comments: - Simplify test - Only perform the ClaimAll() if we actually link libc, so we get the warning back when combining -nostdlib/-nodefaultlibs with -pthread Repository: rL LLVM

[PATCH] D22391: [Sema] Add warning for implicitly casting a null constant to a non null pointer type

2017-02-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 87016. ahatanak marked 2 inline comments as done. ahatanak added a comment. Turning the warning on by default caused clang to issue warnings in many other cases, including Objective-C methods returning nil, which was something r240153 tried to avoid. If we

[PATCH] D28213: [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin

2017-02-03 Thread Dimitry Andric via Phabricator via cfe-commits
dim added a comment. In https://reviews.llvm.org/D28213#666269, @dim wrote: > In https://reviews.llvm.org/D28213#666196, @mgorny wrote: > > > > ... >> What's the value of `__atomic_always_lock_free(sizeof(long long), 0)` for >> gcc and clang? > > For gcc, it is always 0, for clang (I tested

[PATCH] D29520: Lit C++11 Compatibility - Microsoft diagnostics

2017-02-03 Thread Charles Li via Phabricator via cfe-commits
tigerleapgorge created this revision. I am continuing to make Lit tests C++11 compatible. This patch contains 4 tests, previously in review https://reviews.llvm.org/D20710 and https://reviews.llvm.org/D21626. test/SemaCXX/MicrosoftExtensions.cpp This test checks for Microsoft extensions.

[PATCH] D28451: [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-02-03 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay updated this revision to Diff 87054. dylanmckay marked 5 inline comments as done. dylanmckay added a comment. Code review comments - Add 'Subjects = [ObjCMethod]' to attributes - Use 'auto' keyword in one place - Move complex attr parsing logic into static function

[PATCH] D29369: [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

2017-02-03 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 87030. vsk edited the summary of this revision. vsk added a comment. - Use switches per Filipe's comment, and fix a comment in the test case. https://reviews.llvm.org/D29369 Files: lib/CodeGen/CGExprScalar.cpp test/CodeGen/compound-assign-overflow.c

[PATCH] D28344: [AVR] Add support for the full set of inline asm constraints

2017-02-03 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay marked an inline comment as done. dylanmckay added a comment. Ping https://reviews.llvm.org/D28344 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28346: [AVR] Allow specifying the CPU on the command line

2017-02-03 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay added a comment. Ping https://reviews.llvm.org/D28346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28344: [AVR] Add support for the full set of inline asm constraints

2017-02-03 Thread Dylan McKay via Phabricator via cfe-commits
dylanmckay marked an inline comment as done. dylanmckay added a comment. Ping https://reviews.llvm.org/D28344 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29479: Driver: Do not warn about unused -pthread when linking on darwin

2017-02-03 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB updated this revision to Diff 87023. Repository: rL LLVM https://reviews.llvm.org/D29479 Files: lib/Driver/Tools.cpp test/Driver/darwin-ld-pthread.c Index: test/Driver/darwin-ld-pthread.c === --- /dev/null +++

[PATCH] D29480: C++11 Compatibility - OpenMP constant expressions

2017-02-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG https://reviews.llvm.org/D29480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D24812: Lit C++11 Compatibility Patch #11

2017-02-02 Thread Charles Li via Phabricator via cfe-commits
tigerleapgorge updated this revision to Diff 86923. tigerleapgorge added a comment. Revise again, https://reviews.llvm.org/D28425 fixed 7 tests. r290229 fixed 1 test. Down to 8 tests. https://reviews.llvm.org/D24812 Files: test/CodeGenCXX/linetable-cleanup.cpp

[PATCH] D29530: [ubsan] Reduce null checking of C++ object pointers (PR27581)

2017-02-03 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. Given a load of a member variable from an instance method ('this->x'), ubsan inserts a null check for 'this', and another null check for '>x', before allowing the load to occur. Both of these checks are redundant, because 'this' must have been null-checked before the

[PATCH] D29077: [lsan] Enable LSan for x86 Linux.

2017-01-30 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293609: [lsan] Enable LSan for x86 Linux (authored by chefmax). Changed prior to commit: https://reviews.llvm.org/D29077?vs=85756=86387#toc Repository: rL LLVM https://reviews.llvm.org/D29077

[PATCH] D29300: [clang-format] Refactor WhitespaceManager and friends

2017-01-31 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Generally looks like the right direction, minus that I'm not sure yet what the plan for things broken in BreakableToken are. Comment at: lib/Format/TokenAnnotator.cpp:1843 +Current->MatchingParen->opensBlockOrBlockTypeList(Style)) +

[PATCH] D29300: [clang-format] Refactor WhitespaceManager and friends

2017-01-31 Thread Daniel Jasper via Phabricator via cfe-commits
djasper updated this revision to Diff 86404. djasper added a comment. Added assert. Removed unused InToken. https://reviews.llvm.org/D29300 Files: lib/Format/BreakableToken.cpp lib/Format/BreakableToken.h lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h

[PATCH] D29300: [clang-format] Refactor WhitespaceManager and friends

2017-01-31 Thread Daniel Jasper via Phabricator via cfe-commits
djasper closed this revision. djasper added a comment. Submitted as r293616. https://reviews.llvm.org/D29300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2017-01-31 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. Sorry, it took a bit longer, but I have now submitted those changes in r293616. Repository: rL LLVM https://reviews.llvm.org/D28462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D26546: [PPC] Add vec_insert4b/vec_extract4b to altivec.h

2017-01-30 Thread Eric Christopher via Phabricator via cfe-commits
echristo closed this revision. echristo added a comment. This was committed: commit d65cd1f9424369c4ae7f945fac7fd9e4357451b2 Author: Sean Fertile Date: Thu Jan 5 21:43:30 2017 + Add vec_insert4b and vec_extract4b functions to altivec.h Add builtins for the

[PATCH] D29322: [clang-format] Fix regression merging comments across newlines.

2017-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/BreakableToken.cpp:685 LineTok = CurrentTok->Next; +if (CurrentTok->Next && CurrentTok->Next->NewlinesBefore > 1) { + // A line comment section needs to broken by a line comment that is klimek

[PATCH] D29151: [clang-tidy] Add misc-invalidated-iterators check.

2017-01-31 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. Before clang-tidy came into existence the guidelines were very clear. One should write a clang warning if the diagnostic: - can be implemented without path-insensitive analysis (including flow-sensitive) - is checking for language rules (not specific API misuse) In

[PATCH] D29350: clang-cl: Evaluate arguments left-to-right in constructor call with initializer list (PR31831)

2017-01-31 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In https://reviews.llvm.org/D29350#662525, @rnk wrote: > Can you check if we got this wrong in clang 3.8 and 3.9? I'm wondering if > this was a regression, or if we always got this wrong. I tried back to 3.5, and it seems we just always got it wrong.

[PATCH] D29350: clang-cl: Evaluate arguments left-to-right in constructor call with initializer list (PR31831)

2017-01-31 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 Can you check if we got this wrong in clang 3.8 and 3.9? I'm wondering if this was a regression, or if we always got this wrong. https://reviews.llvm.org/D29350

[PATCH] D29369: [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

2017-01-31 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. C requires the operands of arithmetic expressions to be promoted if their types are smaller than an int. Ubsan emits overflow checks when this sort of type promotion occurs, even if there is no way to actually get an overflow with the promoted type. This patch teaches

[PATCH] D29350: clang-cl: Evaluate arguments left-to-right in constructor call with initializer list (PR31831)

2017-01-31 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293732: clang-cl: Evaluate arguments left-to-right in constructor call with initializer… (authored by hans). Changed prior to commit: https://reviews.llvm.org/D29350?vs=86496=86549#toc Repository:

[PATCH] D29339: [OpenMP] Add support for auxiliary triple specification

2017-02-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Frontend/CompilerInstance.cpp:914-915 + // Create TargetInfo for the other side of CUDA and OpenMP compilation. + if ((getLangOpts().CUDA && !getFrontendOpts().AuxTriple.empty()) || + (getLangOpts().OpenMPIsDevice &&

[PATCH] D20561: Warn when taking address of packed member

2017-02-01 Thread Roger via Phabricator via cfe-commits
royger reopened this revision. royger added a comment. This revision is now accepted and ready to land. Hello, This addition is silly, and too noisy for real world usage. For once, it doesn't really check whether the access is actually unaligned or not, and then on x86 for example unaligned

[PATCH] D29358: [OpenMP] Report an error for -faltivec on anything other than PowerPC.

2017-02-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Did not find any errors in this patch, neither in code, nor in test Repository: rL LLVM https://reviews.llvm.org/D29358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29383: [clang-format] Fix regression about not aligning trailing comments in case they were previously aligned, but at different indent.

2017-02-01 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293755: [clang-format] Fix regression about not aligning trailing comments in case they… (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D29383?vs=86595=86596#toc Repository:

[PATCH] D29384: [analyzer] Fix an assertion fail in CStringSyntaxChecker

2017-02-01 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. Right now CStringSytanxChecker assumes that the argument of a sizeof expression is an expression. The argument can also be a type. In this case an assertion fail will be triggered when the SubExpression is being queried. I fixed this issue and did other minor

[PATCH] D29383: [clang-format] Fix regression about not aligning trailing comments in case they were previously aligned, but at different indent.

2017-02-01 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 https://reviews.llvm.org/D29383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D28445: [Analyzer] Extend taint propagation and checking

2017-02-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a subscriber: a.sidorin. NoQ added a comment. Hello! Sorry, i'm very distracted recently. I think your new approach should work, however it would be much easier and more straightforward to just ask the store manager to provide the default-bound symbol for a region directly, instead

[PATCH] D29322: [clang-format] Fix regression merging comments across newlines.

2017-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 86410. krasimir added a comment. - Add a FIXME for separating line comment sections into child lines https://reviews.llvm.org/D29322 Files: lib/Format/BreakableToken.cpp lib/Format/UnwrappedLineParser.cpp unittests/Format/FormatTest.cpp Index:

[PATCH] D29322: [clang-format] Fix regression merging comments across newlines.

2017-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:2127-2129 +// Additional fine-grained breaking of line comment sections is controlled +// by the class BreakableLineCommentSection in case it is desirable to keep +// several line comment

[PATCH] D29326: [clang-format] Fix reflow in block comment lines with leading whitespace.

2017-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @djasper: I agree with the two spaces rule. Sounds pretty reasonable. Will add this feature eventually. Repository: rL LLVM https://reviews.llvm.org/D29326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29323: [clang-format] Don't reflow comment lines starting with '@'.

2017-01-31 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. https://reviews.llvm.org/D29323 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29300: [clang-format] Refactor WhitespaceManager and friends

2017-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. looks good! https://reviews.llvm.org/D29300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29304: [cmake] Hint find_package() to prefer LLVM installed alongside clang

2017-01-31 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293632: [cmake] Hint find_package() to prefer LLVM installed alongside clang (authored by mgorny). Changed prior to commit: https://reviews.llvm.org/D29304?vs=86339=86421#toc Repository: rL LLVM

[PATCH] D21279: Fix some issues in clang-format's AlignConsecutive modes

2017-01-31 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. I apologize in advance if this causes merge conflicts with r293616. However, I do hope that that actually makes this patch easier. https://reviews.llvm.org/D21279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29300: [clang-format] Refactor WhitespaceManager and friends

2017-01-31 Thread Daniel Jasper via Phabricator via cfe-commits
djasper marked an inline comment as done. djasper added inline comments. Comment at: lib/Format/WhitespaceManager.cpp:178 - LastBlockComment = -} else if (Change.Kind == tok::unknown) { - if ((Change.StartOfBlockComment = LastBlockComment))

[PATCH] D29322: [clang-format] Fix regression merging comments across newlines.

2017-01-31 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg minus adding the FIXME to the place where we need the change. Comment at: lib/Format/UnwrappedLineParser.cpp:2127-2129 +// Additional fine-grained breaking of line

[PATCH] D29322: [clang-format] Fix regression merging comments across newlines.

2017-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293624: [clang-format] Fix regression merging comments across newlines. (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D29322?vs=86412=86413#toc Repository: rL LLVM

[PATCH] D27651: [clang-format] Even with AlignConsecutiveDeclarations, PointerAlignment: Right should keep *s and to the right

2017-01-31 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. I have given stuff in WhitespaceManager access to the actual FormatToken in r293616. Hopefully that simplifies this patch. https://reviews.llvm.org/D27651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29300: [clang-format] Refactor WhitespaceManager and friends

2017-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/WhitespaceManager.cpp:178 - LastBlockComment = -} else if (Change.Kind == tok::unknown) { - if ((Change.StartOfBlockComment = LastBlockComment)) What happened to the tok::unknown case?

[PATCH] D29322: [clang-format] Fix regression merging comments across newlines.

2017-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir marked an inline comment as done. krasimir added inline comments. Comment at: lib/Format/BreakableToken.cpp:685 LineTok = CurrentTok->Next; +if (CurrentTok->Next && CurrentTok->Next->NewlinesBefore > 1) { + // A line comment section needs to broken by a

[PATCH] D29027: [Stack Protection] Add remark for reasons why Stack Protection has been applied

2017-01-31 Thread James Henderson via Phabricator via cfe-commits
jhenderson added a comment. Ping https://reviews.llvm.org/D29027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29323: [clang-format] Don't reflow comment lines starting with '@'.

2017-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293617: [clang-format] Don't reflow comment lines starting with '@'. (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D29323?vs=86405=86406#toc Repository: rL LLVM

[PATCH] D29322: [clang-format] Fix regression merging comments across newlines.

2017-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 86412. krasimir marked an inline comment as done. krasimir added a comment. - Add a FIXME also in the parser https://reviews.llvm.org/D29322 Files: lib/Format/BreakableToken.cpp lib/Format/UnwrappedLineParser.cpp unittests/Format/FormatTest.cpp

[PATCH] D29326: [clang-format] Fix reflow in block comment lines with leading whitespace.

2017-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293633: [clang-format] Fix reflow in block comment lines with leading whitespace. (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D29326?vs=86419=86422#toc Repository: rL

[PATCH] D28771: [Analyzer] Various fixes for the IteratorPastEnd checker

2017-01-31 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 86428. baloghadamsoftware added a comment. Updates based on the comments. https://reviews.llvm.org/D28771 Files: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp test/Analysis/Inputs/system-header-simulator-cxx.h

[PATCH] D28771: [Analyzer] Various fixes for the IteratorPastEnd checker

2017-01-31 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorPastEndChecker.cpp:530 + auto value = RVal; + if (auto loc = value.getAs()) { +value = State->getRawSVal(*loc); NoQ wrote: > Is there a test case for this hack? > >

[PATCH] D29329: [clang-format] Fix regression about adding leading whitespace to the content of line comments

2017-01-31 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. https://reviews.llvm.org/D29329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29329: [clang-format] Fix regression about adding leading whitespace to the content of line comments

2017-01-31 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293641: [clang-format] Fix regression about adding leading whitespace to the content of… (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D29329?vs=86435=86437#toc Repository:

[PATCH] D20561: Warn when taking address of packed member

2017-02-01 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. It is not true that all false positives have been fixed, some of the more complex cases involving nested data structures are still open. @royger: Your example is missing explicit alignment. packed has two side effects: remove internal padding and set the alignment to 1.

[PATCH] D20561: Warn when taking address of packed member

2017-02-01 Thread Roger via Phabricator via cfe-commits
royger added a comment. In https://reviews.llvm.org/D20561#663069, @joerg wrote: > @royger: Your example is missing explicit alignment. packed has two side > effects: remove internal padding and set the alignment to 1. That means that > the offset of base doesn't matter so much because reg

[PATCH] D28989: [X86][MS]Adjacent comments within multi-line inline assembly statement

2017-02-01 Thread Marina Yatsina via Phabricator via cfe-commits
myatsina accepted this revision. myatsina added a comment. This revision is now accepted and ready to land. LGTM Repository: rL LLVM https://reviews.llvm.org/D28989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D20561: Warn when taking address of packed member

2017-02-01 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. ... and both revisions should be in the 4.0 branch (taken from r291814) I was looking forward to this warning to help iron out alignment issues at compile-time instead of runtime (our ARM CPUs don't like unaligned access). @royger, can you expand a little on what you

[PATCH] D6550: ASTImporter: Fix missing SourceLoc imports

2017-02-01 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Gabor. One of the bugs fixed in this patch is still present in master, other two are already fixed. Comment at: lib/AST/ASTImporter.cpp:2749 // Create the imported function. + SourceLocation StartLoc = Importer.Import(D->getInnerLocStart());

[PATCH] D20561: Warn when taking address of packed member

2017-02-01 Thread Roger via Phabricator via cfe-commits
royger added a comment. In https://reviews.llvm.org/D20561#663006, @kimgr wrote: > ... and both revisions should be in the 4.0 branch (taken from r291814) > > I was looking forward to this warning to help iron out alignment issues at > compile-time instead of runtime (our ARM CPUs don't like

[PATCH] D6549: ASTImporter: Propagate implicit flag to imported record and field decls

2017-02-01 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. This should be fixed in r269693. https://reviews.llvm.org/D6549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D20561: Warn when taking address of packed member

2017-02-01 Thread Roger via Phabricator via cfe-commits
royger added a comment. In https://reviews.llvm.org/D20561#662959, @rogfer01 wrote: > We fixed all identified false positives in later patches to this one. So > maybe you want to check against trunk clang. If trunk still diagnoses false > positives, please report them to me and I will be more

[PATCH] D16135: Macro Debug Info support in Clang

2017-01-31 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: lib/CodeGen/MacroPPCallbacks.cpp:62 +: DebugInfo(DI), PP(PP), FirstInclude(false), FirstIncludeDone(false), + CommandIncludeFiles(0), SkipFiles(2) { + Parents.push_back(nullptr); aprantl wrote: > Comment why

[PATCH] D28001: [X86] Teach Clang about -mfentry flag

2017-01-31 Thread Nirav Dave via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL293649: [X86] Teach Clang about -mfentry flag (authored by niravd). Changed prior to commit: https://reviews.llvm.org/D28001?vs=83850=86442#toc Repository: rL LLVM https://reviews.llvm.org/D28001

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