Re: r279035 - [Driver] Use llvm-config.h, not config.h to unbreak out-of-tree builds

2016-08-18 Thread Vedant Kumar via cfe-commits
2016 11:56 p.m., "Vedant Kumar via cfe-commits" > wrote: > Author: vedantk > Date: Thu Aug 18 01:43:07 2016 > New Revision: 279035 > > URL: http://llvm.org/viewvc/llvm-project?rev=279035&view=rev > Log: > [Driver] Use llvm-config.h, not config.h to unbrea

Re: [PATCH] D23602: Port tools/clang-format/git-clang-format to work Python beyond 2.7

2016-08-18 Thread Vedant Kumar via cfe-commits
vsk accepted this revision. vsk added a reviewer: vsk. vsk added a comment. This revision is now accepted and ready to land. This lgtm. I haven't touched clang-format before, so it would be good to double-check with the code owner before committing. Repository: rL LLVM https://reviews.llvm.o

Re: [PATCH] D23643: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64

2016-08-18 Thread Vedant Kumar via cfe-commits
vsk added inline comments. Comment at: lib/Driver/Tools.cpp:1163 @@ -1162,3 +1162,3 @@ // FIXME: Should this be picked by checking the target triple instead? - if (Args.getLastArg(options::OPT_arch)) + if ((A = Args.getLastArg(options::OPT_arch))) return "cyclone"; -

Re: [PATCH] D23643: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64

2016-08-18 Thread Vedant Kumar via cfe-commits
vsk added inline comments. Comment at: lib/Driver/Tools.cpp:1163 @@ -1162,3 +1162,3 @@ // FIXME: Should this be picked by checking the target triple instead? - if (Args.getLastArg(options::OPT_arch)) + if ((A = Args.getLastArg(options::OPT_arch))) return "cyclone"; -

Re: [PATCH] D23643: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64

2016-08-18 Thread Vedant Kumar via cfe-commits
vsk added inline comments. Comment at: lib/Driver/Tools.cpp:1163 @@ -1162,3 +1162,3 @@ // FIXME: Should this be picked by checking the target triple instead? - if (Args.getLastArg(options::OPT_arch)) + if ((A = Args.getLastArg(options::OPT_arch))) return "cyclone"; -

Re: [PATCH] D23643: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64

2016-08-18 Thread Vedant Kumar via cfe-commits
vsk updated this revision to Diff 68630. vsk added a comment. Per Akira's suggestion, don't pretend that the Arg* for -arch is a user-specified CPU name (and update the doxygen to reflect this). https://reviews.llvm.org/D23643 Files: lib/Driver/Tools.cpp test/Driver/arm-cortex-cpus.c Inde

r279348 - [Driver] Remove unused #include of llvm/Support/config.h

2016-08-19 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Aug 19 18:15:35 2016 New Revision: 279348 URL: http://llvm.org/viewvc/llvm-project?rev=279348&view=rev Log: [Driver] Remove unused #include of llvm/Support/config.h This is a follow-up to r279112 (which removed the need for the header) and in the same spirit as r279035 (

Re: [PATCH] D23643: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64

2016-08-19 Thread Vedant Kumar via cfe-commits
vsk updated this revision to Diff 68747. vsk added a comment. - Specify a target per Tim's comments. This now passes 'check-clang' on Ubuntu Xenial. https://reviews.llvm.org/D23643 Files: lib/Driver/Tools.cpp test/Driver/arm-cortex-cpus.c Index: test/Driver/arm-cortex-cpus.c =

Re: [PATCH] D23744: driver: Support checking for rlimits via cmake (when bootstrapping)

2016-08-23 Thread Vedant Kumar via cfe-commits
vsk resigned from this revision. vsk edited reviewers, added: beanz; removed: vsk. vsk added a comment. I don't see any issues with this patch, but I'm generally unfamiliar with the bootstrapping process and think Chris could give a better review. (Also, as Richard pointed out earlier, including

Re: [PATCH] D23821: Minor cleanup of the class Pattern

2016-08-23 Thread Vedant Kumar via cfe-commits
vsk added a subscriber: vsk. vsk accepted this revision. vsk added a reviewer: vsk. vsk added a comment. This revision is now accepted and ready to land. I couldn't find any sites which rely on implicit construction of Pattern after a quick scan. The field re-ordering change also looks innocuous.

Re: [PATCH] D23828: Make InitListExpr::isExplicit const

2016-08-23 Thread Vedant Kumar via cfe-commits
vsk added a subscriber: vsk. vsk accepted this revision. vsk added a reviewer: vsk. vsk added a comment. This revision is now accepted and ready to land. LGTM - it's just calling const methods. Repository: rL LLVM https://reviews.llvm.org/D23828

r279613 - [AST] Make InitListExpr::isExplicit const (NFC)

2016-08-23 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Wed Aug 24 01:44:57 2016 New Revision: 279613 URL: http://llvm.org/viewvc/llvm-project?rev=279613&view=rev Log: [AST] Make InitListExpr::isExplicit const (NFC) Patch by Alexander Shaposhnikov! Differential Revision: https://reviews.llvm.org/D23828 Modified: cfe/trunk/i

Re: [PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-08-25 Thread Vedant Kumar via cfe-commits
vsk added a comment. Ping. https://reviews.llvm.org/D7 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23987: [Coverage] Suppress creating a code region if the same area is covered by an expansion region.

2016-08-29 Thread Vedant Kumar via cfe-commits
vsk added a comment. Thanks for looking into this! I like the SourceRegionFilter setup. Comment at: lib/CodeGen/CoverageMappingGen.cpp:261 @@ -253,1 +260,3 @@ + void + emitSourceRegions(const SourceRegionFilter &Filter = SourceRegionFilter()) { for (const auto &Region : S

Re: [PATCH] D23987: [Coverage] Suppress creating a code region if the same area is covered by an expansion region.

2016-08-30 Thread Vedant Kumar via cfe-commits
vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. Lgtm! https://reviews.llvm.org/D23987 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D24042: [test] Add libLTO as a clang test dependency on Darwin

2016-08-30 Thread Vedant Kumar via cfe-commits
vsk created this revision. vsk added a reviewer: bruno. vsk added a subscriber: cfe-commits. Herald added a subscriber: mehdi_amini. Running 'check-clang' on a stock checkout of llvm+clang doesn't work on Darwin, because test/Driver/darwin-ld-lto.c can't find libLTO.dylib. Add libLTO as a clang

r280142 - [test] Add libLTO as a clang test dependency on Darwin

2016-08-30 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Aug 30 14:57:40 2016 New Revision: 280142 URL: http://llvm.org/viewvc/llvm-project?rev=280142&view=rev Log: [test] Add libLTO as a clang test dependency on Darwin Running 'check-clang' on a stock checkout of llvm+clang doesn't work on Darwin, because test/Driver/darwin-l

r280150 - [test] Pass a fake libLTO.dylib to a driver test which depends on it

2016-08-30 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Aug 30 15:36:50 2016 New Revision: 280150 URL: http://llvm.org/viewvc/llvm-project?rev=280150&view=rev Log: [test] Pass a fake libLTO.dylib to a driver test which depends on it This makes it possible to run 'check-clang' on Darwin without building libLTO.dylib. See r2801

r280149 - Revert "[test] Add libLTO as a clang test dependency on Darwin"

2016-08-30 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Aug 30 15:36:48 2016 New Revision: 280149 URL: http://llvm.org/viewvc/llvm-project?rev=280149&view=rev Log: Revert "[test] Add libLTO as a clang test dependency on Darwin" This reverts commit r280142. Mehdi suggested a better way to fix up the test: just create a fake li

Re: [PATCH] D24042: [test] Add libLTO as a clang test dependency on Darwin

2016-08-30 Thread Vedant Kumar via cfe-commits
Done in r280149 (revert this commit) and r280150 (use fake libLTO.dylib). thanks, vedant > On Aug 30, 2016, at 1:12 PM, Mehdi Amini wrote: > > Alternatively, since you only need the presence of a file named libLTO for > the driver to do its magic, test can create an empty file named libLTO.dyl

Re: [PATCH] D22130: Link static PIE programs against rcrt0.o on OpenBSD

2016-09-06 Thread Vedant Kumar via cfe-commits
vsk resigned from this revision. vsk removed a reviewer: vsk. vsk added a comment. I don't see any issues with this patch, but also don't know enough about the openbsd toolchain to lgtm it. https://reviews.llvm.org/D22130 ___ cfe-commits mailing li

Re: [PATCH] D22227: [ubsan] Disable bounds-check for flexible array ivars

2016-09-07 Thread Vedant Kumar via cfe-commits
vsk added a comment. Ping? https://reviews.llvm.org/D7 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D23643: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64

2016-09-08 Thread Vedant Kumar via cfe-commits
vsk added a comment. Ping. https://reviews.llvm.org/D23643 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r280998 - [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64

2016-09-08 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Sep 8 17:53:19 2016 New Revision: 280998 URL: http://llvm.org/viewvc/llvm-project?rev=280998&view=rev Log: [Driver] Report invalid -mtune/-mcpu parameters when -arch=arm64 Differential Revision: https://reviews.llvm.org/D23643 Modified: cfe/trunk/lib/Driver/Tools.c

r297750 - [ubsan] Use the nicer nullability diagnostic handlers

2017-03-14 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Mar 14 11:48:29 2017 New Revision: 297750 URL: http://llvm.org/viewvc/llvm-project?rev=297750&view=rev Log: [ubsan] Use the nicer nullability diagnostic handlers This is a follow-up to r297700 (Add a nullability sanitizer). It addresses some FIXME's re: using nullabilit

r298310 - [docs] Clarify sanitizer flag behavior

2017-03-20 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Mar 20 16:40:58 2017 New Revision: 298310 URL: http://llvm.org/viewvc/llvm-project?rev=298310&view=rev Log: [docs] Clarify sanitizer flag behavior PR32346 suggests that UBSan's docs about the -fsanitize, -fno-sanitize-recover, and -fsanitize-trap options are not explicit

r300295 - [docs] UBSan: Mention that print_stacktrace=1 is unsupported on Darwin

2017-04-13 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Apr 13 20:59:44 2017 New Revision: 300295 URL: http://llvm.org/viewvc/llvm-project?rev=300295&view=rev Log: [docs] UBSan: Mention that print_stacktrace=1 is unsupported on Darwin Printing out stack traces along with UBSan diagnostics is unsupported on Darwin. That's beca

Re: r300295 - [docs] UBSan: Mention that print_stacktrace=1 is unsupported on Darwin

2017-04-13 Thread Vedant Kumar via cfe-commits
Does anyone know what it would take to get the slow unwinder to work on Darwin? thanks, vedant > On Apr 13, 2017, at 6:59 PM, Vedant Kumar via cfe-commits > wrote: > > Author: vedantk > Date: Thu Apr 13 20:59:44 2017 > New Revision: 300295 > > URL: http://llvm.org

Re: r300295 - [docs] UBSan: Mention that print_stacktrace=1 is unsupported on Darwin

2017-04-14 Thread Vedant Kumar via cfe-commits
inlined frames, it works great. But we're almost > always dealing with code that has frame pointers (and the sanitizer runtimes > themselves are built with frame pointers). > > Kuba > >> On 13 Apr 2017, at 19:18, Vedant Kumar via cfe-commits >> wrote: >> &g

r300371 - [ubsan] Don't check alignment if the alignment is 1

2017-04-14 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Apr 14 17:03:37 2017 New Revision: 300371 URL: http://llvm.org/viewvc/llvm-project?rev=300371&view=rev Log: [ubsan] Don't check alignment if the alignment is 1 If a pointer is 1-byte aligned, there's no use in checking its alignment. Somewhat surprisingly, ubsan can spen

r300370 - [ubsan] Reduce alignment checking of C++ object pointers

2017-04-14 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Apr 14 17:03:34 2017 New Revision: 300370 URL: http://llvm.org/viewvc/llvm-project?rev=300370&view=rev Log: [ubsan] Reduce alignment checking of C++ object pointers This patch teaches ubsan to insert an alignment check for the 'this' pointer at the start of each method/l

r300382 - [Coverage] Use the new getInstrProfSectionName API (NFC)

2017-04-14 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Apr 14 19:10:05 2017 New Revision: 300382 URL: http://llvm.org/viewvc/llvm-project?rev=300382&view=rev Log: [Coverage] Use the new getInstrProfSectionName API (NFC) Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Modified: cfe/trunk/lib/CodeGen/CoverageMappin

r300508 - [ubsan] Skip null checks on pointers to the start of an alloca

2017-04-17 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Apr 17 17:26:07 2017 New Revision: 300508 URL: http://llvm.org/viewvc/llvm-project?rev=300508&view=rev Log: [ubsan] Skip null checks on pointers to the start of an alloca Pointers to the start of an alloca are non-null, so we don't need to emit runtime null checks for th

r300509 - [ubsan] Skip null checks if they are constant-folded away

2017-04-17 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Apr 17 17:26:10 2017 New Revision: 300509 URL: http://llvm.org/viewvc/llvm-project?rev=300509&view=rev Log: [ubsan] Skip null checks if they are constant-folded away The IR builder can constant-fold null checks if the pointer operand points to a constant. If the "is-non-

r293343 - [ubsan] Sanity-check shift amounts before truncation (fixes PR27271)

2017-01-27 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Jan 27 17:02:44 2017 New Revision: 293343 URL: http://llvm.org/viewvc/llvm-project?rev=293343&view=rev Log: [ubsan] Sanity-check shift amounts before truncation (fixes PR27271) Ubsan does not report UB shifts in some cases where the shift exponent needs to be truncated t

r293572 - Re-apply "[ubsan] Sanity-check shift amounts before truncation"

2017-01-30 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Jan 30 17:38:54 2017 New Revision: 293572 URL: http://llvm.org/viewvc/llvm-project?rev=293572&view=rev Log: Re-apply "[ubsan] Sanity-check shift amounts before truncation" This re-applies r293343 (reverts commit r293475) with a fix for an assertion failure caused by a mi

Re: r293475 - Revert "r293343 - [ubsan] Sanity-check shift amounts before truncation

2017-01-30 Thread Vedant Kumar via cfe-commits
Sorry about that! I took another shot at it in r293572. vedant > On Jan 30, 2017, at 3:37 AM, Alex Lorenz via cfe-commits > wrote: > > Author: arphaman > Date: Mon Jan 30 05:37:18 2017 > New Revision: 293475 > > URL: http://llvm.org/viewvc/llvm-project?rev=293475&view=rev > Log: > Revert "r2

r294626 - [docs] coverage: Clarify which flags enable gcov-style profiling (NFC)

2017-02-09 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Feb 9 15:33:21 2017 New Revision: 294626 URL: http://llvm.org/viewvc/llvm-project?rev=294626&view=rev Log: [docs] coverage: Clarify which flags enable gcov-style profiling (NFC) Point out that --coverage and -ftest-coverage, which is what most people are used to, do not

Re: Patch for Bug 30413

2017-02-09 Thread Vedant Kumar via cfe-commits
Hi David, Thanks for tracking this down. Do you have a small reproducer to use as a test case? Ideally, you'd add a regression test to clang/test/CodeGenObjC, or extend an existing one. vedant > On Feb 7, 2017, at 6:42 PM, Lobron, David via cfe-commits > wrote: > > Hello clang developers, >

r306497 - Remove a redundant call to ArgList::hasFlag. NFC.

2017-06-27 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Jun 27 18:56:07 2017 New Revision: 306497 URL: http://llvm.org/viewvc/llvm-project?rev=306497&view=rev Log: Remove a redundant call to ArgList::hasFlag. NFC. Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp URL:

r306883 - [Profile] Do not assign counters to functions without bodies

2017-06-30 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Jun 30 14:02:14 2017 New Revision: 306883 URL: http://llvm.org/viewvc/llvm-project?rev=306883&view=rev Log: [Profile] Do not assign counters to functions without bodies The root cause of the issues reported in D32406 and D34680 is that clang instruments functions without

r306882 - Fix a typo. NFC.

2017-06-30 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Jun 30 14:02:14 2017 New Revision: 306882 URL: http://llvm.org/viewvc/llvm-project?rev=306882&view=rev Log: Fix a typo. NFC. Modified: cfe/trunk/test/Profile/cxx-structors.cpp Modified: cfe/trunk/test/Profile/cxx-structors.cpp URL: http://llvm.org/viewvc/llvm-proje

r307955 - [ubsan] Teach the pointer overflow check that "p - <= p" (PR33430)

2017-07-13 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Jul 13 13:55:26 2017 New Revision: 307955 URL: http://llvm.org/viewvc/llvm-project?rev=307955&view=rev Log: [ubsan] Teach the pointer overflow check that "p - <= p" (PR33430) The pointer overflow check gives false negatives when dealing with expressions in which an unsi

r309007 - [ubsan] Null-check pointers in -fsanitize=vptr (PR33881)

2017-07-25 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Jul 25 12:34:23 2017 New Revision: 309007 URL: http://llvm.org/viewvc/llvm-project?rev=309007&view=rev Log: [ubsan] Null-check pointers in -fsanitize=vptr (PR33881) The instrumentation generated by -fsanitize=vptr does not null check a user pointer before loading from it

r309013 - [Frontend] Mark some ASTUnit methods as const. NFC.

2017-07-25 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Jul 25 12:53:27 2017 New Revision: 309013 URL: http://llvm.org/viewvc/llvm-project?rev=309013&view=rev Log: [Frontend] Mark some ASTUnit methods as const. NFC. Patch by Hamza Sood! Differential Revision: https://reviews.llvm.org/D35729 Modified: cfe/trunk/include/c

r309244 - [Coverage] NFC: Save a pair of calls to get{Start,End}

2017-07-26 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Wed Jul 26 19:20:20 2017 New Revision: 309244 URL: http://llvm.org/viewvc/llvm-project?rev=309244&view=rev Log: [Coverage] NFC: Save a pair of calls to get{Start,End} Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Modified: cfe/trunk/lib/CodeGen/CoverageMappingG

r309245 - [Coverage] NFC: Simplify sanity checks with a SpellingRange utility

2017-07-26 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Wed Jul 26 19:20:25 2017 New Revision: 309245 URL: http://llvm.org/viewvc/llvm-project?rev=309245&view=rev Log: [Coverage] NFC: Simplify sanity checks with a SpellingRange utility This should simplify D35925. Modified: cfe/trunk/lib/CodeGen/CoverageMappingGen.cpp Modif

Re: [analyzer] Add support for __builtin_constant_p to BuiltinFunctionChecker

2018-01-16 Thread Vedant Kumar via cfe-commits
+ Devin and George > On Jan 14, 2018, at 10:44 AM, Felix Kostenzer via cfe-commits > wrote: > > > Hi, > > Added evaluation of __builtin_constant_p to the dedicated StaticAnalyzer > checker > along with a regression test. > > 'make clang-test' results: > > Testing Time: 335.63s > Expected

r322729 - [Parse] Forward brace locations to TypeConstructExpr

2018-01-17 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Wed Jan 17 10:53:51 2018 New Revision: 322729 URL: http://llvm.org/viewvc/llvm-project?rev=322729&view=rev Log: [Parse] Forward brace locations to TypeConstructExpr When parsing C++ type construction expressions with list initialization, forward the locations of the braces t

Re: [PATCH] D35338: Add the -fdestroy-globals flag

2018-01-26 Thread Vedant Kumar via cfe-commits
Yeah, I think we have internal users who would be happy to use this flag as well. Stepping back a bit. It's been a while since I followed the discussion on cfe-dev, but I don't recall there being any objections to the flag name or to using it for particular targets. IIRC the objections are abo

Re: Patch for Bug 30413

2017-02-10 Thread Vedant Kumar via cfe-commits
> On Feb 10, 2017, at 8:29 AM, Lobron, David wrote: > > Hi Vedant, > > Thanks for the reply! Yes, I have a small test case- I actually attached it > to the original bug report (https://llvm.org/bugs/show_bug.cgi?id=30413), but > I will go ahead and try adding it to clang/test/CodeGenObjC, or

r295085 - [profiling] Update test case to deal with name variable change (NFC)

2017-02-14 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Feb 14 12:49:03 2017 New Revision: 295085 URL: http://llvm.org/viewvc/llvm-project?rev=295085&view=rev Log: [profiling] Update test case to deal with name variable change (NFC) The 'profn' name variables shouldn't show up after we run the instrprof pass, see https://revi

r295100 - Revert "[profiling] Update test case to deal with name variable change (NFC)"

2017-02-14 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Feb 14 14:03:53 2017 New Revision: 295100 URL: http://llvm.org/viewvc/llvm-project?rev=295100&view=rev Log: Revert "[profiling] Update test case to deal with name variable change (NFC)" This reverts commit r295085, because the corresponding llvm change was reverted. Mod

r295101 - [profiling] Update test cases to deal with name variable change (NFC)

2017-02-14 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Feb 14 14:03:56 2017 New Revision: 295101 URL: http://llvm.org/viewvc/llvm-project?rev=295101&view=rev Log: [profiling] Update test cases to deal with name variable change (NFC) This is a re-try of r295085: fix up some test cases that assume that profile name variables a

r295266 - [Sema] Add lvalue-to-rvalue cast in direct-list-initialization of enum

2017-02-15 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Wed Feb 15 19:20:00 2017 New Revision: 295266 URL: http://llvm.org/viewvc/llvm-project?rev=295266&view=rev Log: [Sema] Add lvalue-to-rvalue cast in direct-list-initialization of enum After r264564, we allowed direct-list-initialization of an enum from an integral value in C+

r295391 - [ubsan] Reduce null checking of C++ object pointers (PR27581)

2017-02-16 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Feb 16 19:05:42 2017 New Revision: 295391 URL: http://llvm.org/viewvc/llvm-project?rev=295391&view=rev Log: [ubsan] Reduce null checking of C++ object pointers (PR27581) This patch teaches ubsan to insert exactly one null check for the 'this' pointer per method/lambda.

r295396 - Revert "[ubsan] Reduce null checking of C++ object pointers (PR27581)"

2017-02-16 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Feb 16 19:42:36 2017 New Revision: 295396 URL: http://llvm.org/viewvc/llvm-project?rev=295396&view=rev Log: Revert "[ubsan] Reduce null checking of C++ object pointers (PR27581)" This reverts commit r295391. It breaks this bot: http://lab.llvm.org:8011/builders/clang-wi

r295401 - Retry: [ubsan] Reduce null checking of C++ object pointers (PR27581)

2017-02-16 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Feb 16 20:03:51 2017 New Revision: 295401 URL: http://llvm.org/viewvc/llvm-project?rev=295401&view=rev Log: Retry: [ubsan] Reduce null checking of C++ object pointers (PR27581) This patch teaches ubsan to insert exactly one null check for the 'this' pointer per method/la

r295494 - Revert "Retry: [ubsan] Reduce null checking of C++ object pointers (PR27581)"

2017-02-17 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Feb 17 14:59:40 2017 New Revision: 295494 URL: http://llvm.org/viewvc/llvm-project?rev=295494&view=rev Log: Revert "Retry: [ubsan] Reduce null checking of C++ object pointers (PR27581)" This reverts commit r295401. It breaks the ubsan self-host. It inserts object size ch

r295515 - Retry^2: [ubsan] Reduce null checking of C++ object pointers (PR27581)

2017-02-17 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Feb 17 17:22:59 2017 New Revision: 295515 URL: http://llvm.org/viewvc/llvm-project?rev=295515&view=rev Log: Retry^2: [ubsan] Reduce null checking of C++ object pointers (PR27581) This patch teaches ubsan to insert exactly one null check for the 'this' pointer per method/

r295514 - [ubsan] Pass a set of checks to skip to EmitTypeCheck() (NFC)

2017-02-17 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Feb 17 17:22:55 2017 New Revision: 295514 URL: http://llvm.org/viewvc/llvm-project?rev=295514&view=rev Log: [ubsan] Pass a set of checks to skip to EmitTypeCheck() (NFC) CodeGenFunction::EmitTypeCheck accepts a bool flag which controls whether or not null checks are emit

r295528 - [profiling] Tighten test cases which refer to "profn" vars. NFC.

2017-02-17 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Feb 17 19:50:14 2017 New Revision: 295528 URL: http://llvm.org/viewvc/llvm-project?rev=295528&view=rev Log: [profiling] Tighten test cases which refer to "profn" vars. NFC. The frontend can't see "__profn" profile name variables after IRGen because llvm throws these away

r295527 - Reuse a local variable. NFC.

2017-02-17 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Feb 17 19:50:11 2017 New Revision: 295527 URL: http://llvm.org/viewvc/llvm-project?rev=295527&view=rev Log: Reuse a local variable. NFC. Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp URL: http://llvm.org/viewvc/llvm-p

r295532 - [profiling] Make a test more explicit. NFC.

2017-02-17 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Feb 17 20:02:55 2017 New Revision: 295532 URL: http://llvm.org/viewvc/llvm-project?rev=295532&view=rev Log: [profiling] Make a test more explicit. NFC. The cxx-structors.cpp test checks that some instrumentation doesn't appear, but it should be more explicit about which

r295918 - Rename a helper function, NFC.

2017-02-22 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Wed Feb 22 19:22:38 2017 New Revision: 295918 URL: http://llvm.org/viewvc/llvm-project?rev=295918&view=rev Log: Rename a helper function, NFC. Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp cfe/trunk/lib/CodeGen/CGExprCXX.cpp cfe/trunk/lib/CodeGen/CodeGenFunction.h

r296062 - [profiling] PR31992: Don't skip interesting non-base constructors

2017-02-23 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Feb 23 19:15:19 2017 New Revision: 296062 URL: http://llvm.org/viewvc/llvm-project?rev=296062&view=rev Log: [profiling] PR31992: Don't skip interesting non-base constructors Fix the fact that we don't assign profile counters to constructors in classes with virtual bases,

r296213 - [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193)

2017-02-24 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Feb 24 18:43:36 2017 New Revision: 296213 URL: http://llvm.org/viewvc/llvm-project?rev=296213&view=rev Log: [ubsan] Omit superflous overflow checks for promoted arithmetic (PR20193) C requires the operands of arithmetic expressions to be promoted if their types are small

r296214 - [ubsan] Detect signed overflow UB in remainder operations

2017-02-24 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Feb 24 18:43:39 2017 New Revision: 296214 URL: http://llvm.org/viewvc/llvm-project?rev=296214&view=rev Log: [ubsan] Detect signed overflow UB in remainder operations Teach ubsan to diagnose remainder operations which have undefined behavior due to signed overflow (e.g IN

r296231 - [profiling] Fix profile counter increment when emitting selects (PR32019)

2017-02-24 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Feb 24 20:30:03 2017 New Revision: 296231 URL: http://llvm.org/viewvc/llvm-project?rev=296231&view=rev Log: [profiling] Fix profile counter increment when emitting selects (PR32019) Clang has logic to lower certain conditional expressions directly into llvm select instru

r296234 - Revert "[profiling] Fix profile counter increment when emitting selects (PR32019)"

2017-02-24 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Feb 24 20:59:47 2017 New Revision: 296234 URL: http://llvm.org/viewvc/llvm-project?rev=296234&view=rev Log: Revert "[profiling] Fix profile counter increment when emitting selects (PR32019)" This reverts commit r296231. It causes an assertion failure on 32-bit machines

r296245 - Retry: [profiling] Fix profile counter increment when emitting selects (PR32019)

2017-02-24 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Sat Feb 25 00:35:45 2017 New Revision: 296245 URL: http://llvm.org/viewvc/llvm-project?rev=296245&view=rev Log: Retry: [profiling] Fix profile counter increment when emitting selects (PR32019) 2nd attempt: the first was in r296231, but it had a use after lifetime bug. Clang

r296246 - Fix -Wparentheses warning

2017-02-24 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Sat Feb 25 00:47:00 2017 New Revision: 296246 URL: http://llvm.org/viewvc/llvm-project?rev=296246&view=rev Log: Fix -Wparentheses warning Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp URL: http://llvm.org/viewvc/llvm-

r296247 - Suppress uninteresting warnings in test/CoverageMapping, NFC.

2017-02-24 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Sat Feb 25 01:05:41 2017 New Revision: 296247 URL: http://llvm.org/viewvc/llvm-project?rev=296247&view=rev Log: Suppress uninteresting warnings in test/CoverageMapping, NFC. Modified: cfe/trunk/test/CoverageMapping/implicit-def-in-macro.m cfe/trunk/test/CoverageMappi

r296248 - Weaken test/Profile/c-ternary.c

2017-02-24 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Sat Feb 25 01:21:23 2017 New Revision: 296248 URL: http://llvm.org/viewvc/llvm-project?rev=296248&view=rev Log: Weaken test/Profile/c-ternary.c There is a bot which doesn't use '%1' as the IR name of the first argument to a function: http://lab.llvm.org:8011/builders/clang-

r296374 - [ubsan] Factor out logic to emit a range check. NFC.

2017-02-27 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Feb 27 13:46:19 2017 New Revision: 296374 URL: http://llvm.org/viewvc/llvm-project?rev=296374&view=rev Log: [ubsan] Factor out logic to emit a range check. NFC. This is a readability improvement, but it will also help prep an upcoming patch to detect UB loads from bitfie

Re: r296374 - [ubsan] Factor out logic to emit a range check. NFC.

2017-02-27 Thread Vedant Kumar via cfe-commits
gt; On Feb 27, 2017, at 11:46 AM, Vedant Kumar via cfe-commits > wrote: > > Author: vedantk > Date: Mon Feb 27 13:46:19 2017 > New Revision: 296374 > > URL: http://llvm.org/viewvc/llvm-project?rev=296374&view=rev > Log: > [ubsan] Factor out logic to emit a range check.

Re: r296374 - [ubsan] Factor out logic to emit a range check. NFC.

2017-02-27 Thread Vedant Kumar via cfe-commits
d. >>> >>> After staring at my diff I couldn't find anything that would explain the >>> failure. No other bots seem upset. >>> >>> Do you have any idea about what's going on? Let me know if you want me to >>> revert... >>> &

r296996 - [ubsan] Extend the nonnull arg check to ObjC

2017-03-05 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Sun Mar 5 23:28:22 2017 New Revision: 296996 URL: http://llvm.org/viewvc/llvm-project?rev=296996&view=rev Log: [ubsan] Extend the nonnull arg check to ObjC UBSan's nonnull argument check applies when a parameter has the "nonnull" attribute. The check currently works for Fun

r297298 - [ubsan] Detect UB loads from bitfields

2017-03-08 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Wed Mar 8 11:38:57 2017 New Revision: 297298 URL: http://llvm.org/viewvc/llvm-project?rev=297298&view=rev Log: [ubsan] Detect UB loads from bitfields It's possible to load out-of-range values from bitfields backed by a boolean or an enum. Check for UB loads from bitfields.

r297331 - Revert "[ubsan] Detect UB loads from bitfields"

2017-03-08 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Wed Mar 8 18:18:53 2017 New Revision: 297331 URL: http://llvm.org/viewvc/llvm-project?rev=297331&view=rev Log: Revert "[ubsan] Detect UB loads from bitfields" This reverts commit r297298. It breaks the self-host on this bot: http://lab.llvm.org:8011/builders/sanitizer-x

Re: r297298 - [ubsan] Detect UB loads from bitfields

2017-03-08 Thread Vedant Kumar via cfe-commits
eCompilerInvocation(clang::CompilerInstance*) > (/mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm_build0/bin/clang-5.0+0x251658a) > #42 0x00a6e328 cc1_main(llvm::ArrayRef, char > const*, void*) > (/mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap

r297389 - Retry: [ubsan] Detect UB loads from bitfields

2017-03-09 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Thu Mar 9 10:06:27 2017 New Revision: 297389 URL: http://llvm.org/viewvc/llvm-project?rev=297389&view=rev Log: Retry: [ubsan] Detect UB loads from bitfields It's possible to load out-of-range values from bitfields backed by a boolean or an enum. Check for UB loads from bitf

r297700 - [ubsan] Add a nullability sanitizer

2017-03-13 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Mar 13 20:56:34 2017 New Revision: 297700 URL: http://llvm.org/viewvc/llvm-project?rev=297700&view=rev Log: [ubsan] Add a nullability sanitizer Teach UBSan to detect when a value with the _Nonnull type annotation assumes a null value. Call expressions, initializers, assi

Re: r286748 - Fix PR28366: Handle variables from enclosing local scopes more gracefully during constant expression evaluation.

2016-11-14 Thread Vedant Kumar via cfe-commits
Hi Faisal, Our ASan bot started complaining after this commit. I'm not 100% sure this caused it yet, though I'm running tests. Could you take a look? thanks, vedant FAIL: Clang :: SemaCXX/constant-expression-cxx11.cpp (9393 of 29261) TEST 'Clang :: SemaCXX/constant-expre

Re: r286748 - Fix PR28366: Handle variables from enclosing local scopes more gracefully during constant expression evaluation.

2016-11-14 Thread Vedant Kumar via cfe-commits
Reverting this commit doesn't solve anything, sorry for the noise. It seems to hit an infinite loop: frame #17: 0x0001083d48ab clang`::Visit() [inlined] HandleConditionalOperator + 165 at ExprConstant.cpp:4212 frame #18: 0x0001083d4806 clang`::Visit() [inlined] VisitConditional

[libcxx] r287004 - Revert "P0503R0, adopted in Issaquah, rewords some requirements on nullptr_t and istream_iterator. No code changes were needed, but I updated a few tests. Also resolved P0509 and P0

2016-11-15 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Nov 15 12:48:36 2016 New Revision: 287004 URL: http://llvm.org/viewvc/llvm-project?rev=287004&view=rev Log: Revert "P0503R0, adopted in Issaquah, rewords some requirements on nullptr_t and istream_iterator. No code changes were needed, but I updated a few tests. Also r

Re: r286699 - [c++1z] Support constant folding for __builtin_strchr and __builtin_memchr.

2016-11-15 Thread Vedant Kumar via cfe-commits
Hi Richard, Our internal ASan bot started failing after this and r286678: ASAN:DEADLYSIGNAL = ==95464==ERROR: AddressSanitizer: stack-overflow on address 0x7fff56c68b40 (pc 0x000110c582a2 bp 0x7fff56c69970 sp 0x7fff56c68b40 T0)

Re: r286699 - [c++1z] Support constant folding for __builtin_strchr and __builtin_memchr.

2016-11-15 Thread Vedant Kumar via cfe-commits
Thank you! The bot recovered after r287066. vedant > On Nov 15, 2016, at 5:09 PM, Richard Smith wrote: > > On Tue, Nov 15, 2016 at 3:39 PM, Vedant Kumar wrote: > Hi Richard, > > Our internal ASan bot started failing after this and r286678: > > ASAN:DEADLYSIGNAL > ===

Re: r285301 - Attempt to make clang-format.py python 3 - compatible.

2016-12-06 Thread Vedant Kumar via cfe-commits
Hi Alexander, I think this will cause an error if used with python3 (at least, it fails on my system). Here's the problem: line.decode(encoding) When vim is compiled against python3, the type of 'line' remains 'str' -- not 'bytes'. There isn't a 'decode' method on strings: it only exists for b

r289290 - [ubsan] Treat ObjC's BOOL as if its range is always {0, 1}

2016-12-09 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Dec 9 17:48:18 2016 New Revision: 289290 URL: http://llvm.org/viewvc/llvm-project?rev=289290&view=rev Log: [ubsan] Treat ObjC's BOOL as if its range is always {0, 1} On some Apple platforms, the ObjC BOOL type is defined as a signed char. When performing instrumentation

r289308 - [clang-format] Another attempt at python 3 compatibility

2016-12-09 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Dec 9 18:54:13 2016 New Revision: 289308 URL: http://llvm.org/viewvc/llvm-project?rev=289308&view=rev Log: [clang-format] Another attempt at python 3 compatibility The entries in vim.current.buffer appear to be decoded strings, which means that python3 won't allow invok

Re: r285301 - Attempt to make clang-format.py python 3 - compatible.

2016-12-09 Thread Vedant Kumar via cfe-commits
I confirmed that this works with :pyf and :py3f. Committed in r289308. thanks, vedant > On Dec 8, 2016, at 6:51 AM, Alexander Kornienko wrote: > > If this fixes the problem on python 3 (and it leaves the current behavior on > python 2), then it looks good. Can you submit it? > > On Wed, Dec

r289452 - Avoid use of std::to_string. NFC.

2016-12-12 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Dec 12 12:47:33 2016 New Revision: 289452 URL: http://llvm.org/viewvc/llvm-project?rev=289452&view=rev Log: Avoid use of std::to_string. NFC. Apparently this routine isn't available on some Android platforms. See the mailing list thread re: D21695. Modified: cfe/tru

Re: [PATCH] D21695: [clang] Version support for UBSan handlers

2016-12-12 Thread Vedant Kumar via cfe-commits
> On Dec 12, 2016, at 10:17 AM, Andrew Ford via Phabricator > wrote: > > andrewford added a comment. > > This broke the build on android due to use of std::to_string. Would someone > mind changing it to llvm::to_string, I don't have commit access to change it > myself. Thanks! Should be don

Re: r289308 - [clang-format] Another attempt at python 3 compatibility

2016-12-12 Thread Vedant Kumar via cfe-commits
don't think this is possible, because that would prevent us from using the JSON module. > On Dec 10, 2016, at 6:16 AM, Nico Weber wrote: > > Shouldn't this at least use >=? (But it feels like there is probably a way > that doesn't have to do UA sniffing, so

r300723 - [Coverage] Don't emit mappings for functions in dependent contexts (fixes PR32679)

2017-04-19 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Wed Apr 19 12:58:30 2017 New Revision: 300723 URL: http://llvm.org/viewvc/llvm-project?rev=300723&view=rev Log: [Coverage] Don't emit mappings for functions in dependent contexts (fixes PR32679) The coverage implementation marks functions which won't be emitted as 'deferred

r301249 - [Coverage] Avoid null deref in skipRegionMappingForDecl (fixes PR32761)

2017-04-24 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Apr 24 15:52:04 2017 New Revision: 301249 URL: http://llvm.org/viewvc/llvm-project?rev=301249&view=rev Log: [Coverage] Avoid null deref in skipRegionMappingForDecl (fixes PR32761) Patch by Adam Folwarczny! Differential Revision: https://reviews.llvm.org/D32406 Added:

r301250 - Remove a dead field. NFC.

2017-04-24 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Mon Apr 24 15:54:36 2017 New Revision: 301250 URL: http://llvm.org/viewvc/llvm-project?rev=301250&view=rev Log: Remove a dead field. NFC. Suggested by Adam Folwarczny! Modified: cfe/trunk/lib/CodeGen/CodeGenPGO.cpp cfe/trunk/lib/CodeGen/CodeGenPGO.h Modified: cfe/t

r301377 - [ubsan] Skip alignment checks on allocas with known alignment

2017-04-25 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Tue Apr 25 21:17:21 2017 New Revision: 301377 URL: http://llvm.org/viewvc/llvm-project?rev=301377&view=rev Log: [ubsan] Skip alignment checks on allocas with known alignment It's possible to determine the alignment of an alloca at compile-time. Use this information to skip e

r301420 - [Sema] Avoid using a null type pointer (fixes PR32750)

2017-04-26 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Wed Apr 26 10:40:21 2017 New Revision: 301420 URL: http://llvm.org/viewvc/llvm-project?rev=301420&view=rev Log: [Sema] Avoid using a null type pointer (fixes PR32750) isMicrosoftMissingTypename() uses a Type pointer without first checking that it's non-null. PR32750 reports

<    1   2   3   4   5   6   >