clang_getIncudedFile python binding fix

2018-05-03 Thread József LÁZ via cfe-commits
Hi all, I made fix in clang's python bindings. The binding for C api's clang_getIncludedFile was not implemented. The patch was made on trunk. I believe this bugticket is related: https://bugs.llvm.org/show_bug.cgi?id=15223 Any thoughts? József Láz This message, i

[PATCH] D46382: [OpenCL] Factor out language version printing

2018-05-03 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: rivanvx. Herald added a subscriber: cfe-commits. Generate a printable OpenCL language version number in a single place and select between the OpenCL C or OpenCL C++ version accordingly. Repository: rC Clang https://reviews.llvm.org/D46382

[PATCH] D46383: implementing Cursor.get_included_file in python bindings

2018-05-03 Thread József Láz via Phabricator via cfe-commits
jlaz created this revision. Herald added a subscriber: cfe-commits. adding function: `Cursor.get_included_file` , so the C API's `clang_getIncludedFile` function is available on the python binding interface also adding test to unittests Repository: rC Clang https://reviews.llvm.org/D46383 F

r331448 - Rename invariant.group.barrier to launder.invariant.group

2018-05-03 Thread Piotr Padlewski via cfe-commits
Author: prazek Date: Thu May 3 04:03:01 2018 New Revision: 331448 URL: http://llvm.org/viewvc/llvm-project?rev=331448&view=rev Log: Rename invariant.group.barrier to launder.invariant.group Summary: This is one of the initial commit of "RFC: Devirtualization v2" proposal: https://docs.google.com

[PATCH] D32905: [Analyzer] Iterator Checker - Part 9: Evaluation of std::find-like calls

2018-05-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 144999. baloghadamsoftware added a comment. Rebased. https://reviews.llvm.org/D32905 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/Inputs/system-header-simulator-cxx.h test/Analysis/iterator-range.cpp Index: test/Ana

[PATCH] D46049: [OpenCL] Add constant address space to __func__ in AST

2018-05-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 145000. Anastasia added a comment. - Changed to adjust common function - Enhanced CodeGen string literal case to also check the predefined expr https://reviews.llvm.org/D46049 Files: include/clang/AST/ASTContext.h lib/AST/ASTContext.cpp lib/AST/Expr

[PATCH] D45416: [AST, analyzer] Transform rvalue cast outputs to lvalues (fheinous-gnu-extensions)

2018-05-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin updated this revision to Diff 144998. a.sidorin retitled this revision from "[analyzer] ExprEngine: model GCC inline asm rvalue cast outputs" to "[AST, analyzer] Transform rvalue cast outputs to lvalues (fheinous-gnu-extensions)". a.sidorin edited the summary of this revision. a.sidorin

Re: If I want to disable certain attributes, such as "swiftcall",isthere any way to do it now?

2018-05-03 Thread Aaron Ballman via cfe-commits
On Thu, May 3, 2018 at 1:25 AM, 朴素 <772847...@qq.com> wrote: > hi, Aaron > > The reason why i not use of TargetSpecificAttr is as follows.If I plan to > support a new platform, I don't want to let users use certain attributes > because of hardware or simply not want to. Yes, we can use > TargetSp

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D45702#1085890, @shuaiwang wrote: > In https://reviews.llvm.org/D45702#1085224, @aaron.ballman wrote: > > > > Have you run this over any large code bases to see whether the check > > > triggers in practice? > > > > I'm still curious abou

[PATCH] D41968: [libunwind][MIPS] Support MIPS floating-point registers for hard-float ABIs.

2018-05-03 Thread Simon Dardis via Phabricator via cfe-commits
sdardis accepted this revision. sdardis added a comment. This revision is now accepted and ready to land. Herald added a subscriber: chrib. Sorry for the delay. LGTM. Repository: rUNW libunwind https://reviews.llvm.org/D41968 ___ cfe-commits mai

[PATCH] D46385: Fix test failure for missing _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS

2018-05-03 Thread Taiju Tsuiki via Phabricator via cfe-commits
tzik created this revision. tzik added a reviewer: thakis. Herald added subscribers: cfe-commits, christof. This is a follow-up change to r331150. The CL moved the macro from individual file to build file, but the macro is missed in a test config file. Repository: rCXXA libc++abi https://revi

?????? If I want to disable certain attributes, such as"swiftcall",isthere any way to do it now?

2018-05-03 Thread ???? via cfe-commits
Thanks. -- -- ??: "Aaron Ballman"; : 2018??5??3??(??) 7:40 ??: ""<772847...@qq.com>; : "cfe-commits"; : Re: If I want to disable certain attributes, such as"swiftcall",isthere any way to do it now? On Thu, May 3,

r331424 - [Sema] Do not match function type with const T in template argument deduction

2018-05-03 Thread Lei Liu via cfe-commits
Author: lliu0 Date: Wed May 2 18:43:23 2018 New Revision: 331424 URL: http://llvm.org/viewvc/llvm-project?rev=331424&view=rev Log: [Sema] Do not match function type with const T in template argument deduction From http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#1584, function type sh

r331438 - Fix -Wunused-variable warning in Clang.cpp

2018-05-03 Thread Karl-Johan Karlsson via cfe-commits
Author: karka Date: Wed May 2 22:53:29 2018 New Revision: 331438 URL: http://llvm.org/viewvc/llvm-project?rev=331438&view=rev Log: Fix -Wunused-variable warning in Clang.cpp Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp URL: http://

Re: clang_getIncudedFile python binding fix

2018-05-03 Thread Jonathan Coe via cfe-commits
This patch looks good to me - great work! If you can upload it to https://reviews.llvm.org then I can review and merge it for you once it's approved. regards, Jon On 3 May 2018 at 08:55, József LÁZ via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Hi all, > > I made fix in clang’s python

[libcxxabi] r331450 - Fix test failure for missing _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS

2018-05-03 Thread Nico Weber via cfe-commits
Author: nico Date: Thu May 3 05:44:27 2018 New Revision: 331450 URL: http://llvm.org/viewvc/llvm-project?rev=331450&view=rev Log: Fix test failure for missing _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS This is a follow-up change to r331150. The CL moved the macro from individual file to b

[PATCH] D46385: Fix test failure for missing _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS

2018-05-03 Thread Nico Weber via Phabricator via cfe-commits
thakis closed this revision. thakis added a comment. r331450, thanks! Repository: rCXXA libc++abi https://reviews.llvm.org/D46385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46386: Adding __atomic_fetch_min/max intrinsics to clang

2018-05-03 Thread Elena Demikhovsky via Phabricator via cfe-commits
delena created this revision. delena added reviewers: igorb, t.p.northover, ABataev, jfb, rjmccall. Herald added subscribers: cfe-commits, Anastasia. Added __atomic_fetch_min, max, umin, umax intrinsics to clang. These intrinsics work exactly as all other __atomic_fetch_* intrinsics and allow to

Re: [libcxxabi] r331150 - Move _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS macro to build system

2018-05-03 Thread Nico Weber via cfe-commits
r331450 should hopefully fix this. On Tue, May 1, 2018 at 8:55 AM, Nico Weber wrote: > tzik, can you take a look what's up on those bots? > > On Tue, May 1, 2018, 5:48 AM Maxim Kuvyrkov > wrote: > >> Hi Nico, >> >> This broke armv7 and aarch64 bots: >> - http://lab.llvm.org:8011/builders/libcxx

[PATCH] D46370: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG

2018-05-03 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/D46370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. As Devin says (and as we discussed this with Anna Zaks) alpha checkers are still in development, so we don't want to expose them to the users, even very curious ones. For those who want to help with development of the alpha checkers, there's always a possibility to chang

[PATCH] D32906: [Analyzer] Iterator Checker - Part 10: Support for iterators passed as parameter

2018-05-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 145008. baloghadamsoftware added a comment. Rebased, and minor modifications done according to the comments. https://reviews.llvm.org/D32906 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/iterator-range.cpp test/Analys

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46159#1086322, @alexfh wrote: > How about `-enable-alpha-checks=yes-i-know-they-are-broken` ? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46159 ___ cfe-commits mailing l

[PATCH] D46183: [clangd] Incorporate #occurrences in scoring code complete results.

2018-05-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 145011. sammccall added a comment. Add completion test. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46183 Files: clangd/CodeComplete.cpp clangd/index/Index.cpp clangd/index/Index.h clangd/index/MemIndex.cpp unittests/clangd/C

[PATCH] D46183: [clangd] Incorporate #occurrences in scoring code complete results.

2018-05-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Added a test - it's kind of perfunctory, I really want to organize symbol scoring more thoroughly which will provide a better place to test well. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46183 ___ c

[PATCH] D46353: [ASTImporter] Extend lookup logic in class templates

2018-05-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Gabor, Thank you for the patch. It looks mostly good, but I have a question: should we add this new declaration to the redeclaration chain like we do it for RecordDecls? Repository: rC Clang https://reviews.llvm.org/D46353 ___

[PATCH] D26054: Use `getFileLoc()` instead of `getSpellingLoc()` in the ASTImporter

2018-05-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hi Rafael, Could you please show the AST we get with `getDecomposedExpansionLoc()`? This change can be an item for a separate patch. https://reviews.llvm.org/D26054 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D38845: [ASTImporter] Support importing UnresolvedMemberExpr, DependentNameType, DependentScopeDeclRefExpr

2018-05-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Hello Peter! This looks almost OK, just some minor formatting issues. Comment at: unittests/AST/ASTImporterTest.cpp:1509 + MatchVerifier Verifier; + testImport("template struct S {static T foo;};" + "template void declToImport() {"

[PATCH] D26054: Use `getFileLoc()` instead of `getSpellingLoc()` in the ASTImporter

2018-05-03 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. It puts everything at the start of the marco expansion. `-FunctionDecl 0x12f5218 prev 0x12f4fa0 line:12:5 used foo 'int ()' `-CompoundStmt 0x12f5600 |-DeclStmt 0x12f5508 | `-VarDecl 0x12f5470 col:15 used s 'struct S *' cinit | `-ImplicitCast

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

2018-05-03 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 145019. MTC added a comment. - fix typos - code refactoring, add auxiliary method `memsetAux()` - according to a.sidorin's suggestions, remove the useless state splitting. - make `StoreManager::overwriteRegion()` pure virtual Repository: rC Clang https://revi

[clang-tools-extra] r331456 - [clang-tidy] Remove AnalyzeTemporaryDtors option.

2018-05-03 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu May 3 07:40:37 2018 New Revision: 331456 URL: http://llvm.org/viewvc/llvm-project?rev=331456&view=rev Log: [clang-tidy] Remove AnalyzeTemporaryDtors option. Remove the `AnalyzeTemporaryDtors` option, since the corresponding `cfg-temporary-dtors` option of the Static Anal

[PATCH] D46183: [clangd] Incorporate #occurrences in scoring code complete results.

2018-05-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 145021. sammccall added a comment. Fix tests. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46183 Files: clangd/CodeComplete.cpp clangd/index/Index.cpp clangd/index/Index.h clangd/index/MemIndex.cpp unittests/clangd/CodeComplet

[PATCH] D46393: Remove explicit cfg-temporary-dtors=true

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. alexfh added a reviewer: NoQ. Remove explicit -analyzer-config cfg-temporary-dtors=true in analyzer tests, since this option defaults to true since r326461. Repository: rC Clang https://reviews.llvm.org/D46393 Files: test/Analysis/cfg-rich-constructors.cpp t

[PATCH] D46183: [clangd] Incorporate #occurrences in scoring code complete results.

2018-05-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46353: [ASTImporter] Extend lookup logic in class templates

2018-05-03 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > should we add this new declaration to the redeclaration chain like we do it > for RecordDecls? I think, on a long term we should. Otherwise we could loose e.g. C++11 attributes which are attached to the forward declaration only. However, I'd do that as a separate comm

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > As Devin says (and as we discussed this with Anna Zaks) alpha checkers are > still in development, so we don't want to expose them to the users, even very > curious ones. Then why do we make them available with `clang --analyze`? If the plan is not to expose them to

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/ClangTidy.cpp:373-376 // FIXME: Remove this option once clang's cfg-temporary-dtors option defaults // to true. AnalyzerOptions-

[clang-tools-extra] r331457 - [clangd] Incorporate #occurrences in scoring code complete results.

2018-05-03 Thread Sam McCall via cfe-commits
Author: sammccall Date: Thu May 3 07:53:02 2018 New Revision: 331457 URL: http://llvm.org/viewvc/llvm-project?rev=331457&view=rev Log: [clangd] Incorporate #occurrences in scoring code complete results. Summary: needs tests Reviewers: ilya-biryukov Subscribers: klimek, ioeric, MaskRay, jkorous

[PATCH] D46183: [clangd] Incorporate #occurrences in scoring code complete results.

2018-05-03 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE331457: [clangd] Incorporate #occurrences in scoring code complete results. (authored by sammccall, committed by ). Changed prior to commit: https://reviews.llvm.org/D46183?vs=145021&id=145024#toc Re

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added inline comments. Comment at: clang-tidy/ClangTidy.cpp:373-376 // FIXME: Remove this option once clang's cfg-temporary-dtors option defaults // to true. AnalyzerOptions->Config["cfg-temporary-dtors"] = Context.getOptions().AnalyzeTemporaryDtors ? "tru

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D46159#1086332, @lebedev.ri wrote: > In https://reviews.llvm.org/D46159#1086322, @alexfh wrote: > > > > > > How about `-enable-alpha-checks=yes-i-know-they-are-broken` ? A hidden flag with a scary name without any way to specify it in .clang-t

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D46159#1086463, @pfultz2 wrote: > > As Devin says (and as we discussed this with Anna Zaks) alpha checkers are > > still in development, so we don't want to expose them to the users, even > > very curious ones. > > Then why do we make them

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > But still, could you explain the use case and why a local modification of > clang-tidy is not an option? Because I would like to direct users to try an alpha check on thier local codebases without having to tell them to rebuild clang. Repository: rCTE Clang Tools

[PATCH] D46374: Add support for ObjC property name to be a single acronym.

2018-05-03 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton requested changes to this revision. benhamilton added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:222 + [MatchedDecl](std::string const &s) { +return s ==

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D46159#1086479, @pfultz2 wrote: > > But still, could you explain the use case and why a local modification of > > clang-tidy is not an option? > > Because I would like to direct users to try an alpha check on their local > codebases without ha

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D46159#1086487, @alexfh wrote: > In https://reviews.llvm.org/D46159#1086479, @pfultz2 wrote: > > > > But still, could you explain the use case and why a local modification of > > > clang-tidy is not an option? > > > > Because I would like to di

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D46159#1086472, @lebedev.ri wrote: > In https://reviews.llvm.org/D46159#1086463, @pfultz2 wrote: > > > > As Devin says (and as we discussed this with Anna Zaks) alpha checkers > > > are still in development, so we don't want to expose th

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Felix Bruns via Phabricator via cfe-commits
fxb created this revision. fxb added reviewers: hans, erichkeane, thakis. Herald added a subscriber: cfe-commits. This replicates 'cl.exe' behavior and allows for both preprocessor output and dependency information to be extraced with a single compiler invocation. This is especially useful for co

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Felix Bruns via Phabricator via cfe-commits
fxb added a comment. This is my first patch to clang, so any feedback regarding implementation appreciated! Also, let me know if you have any suggestions on how to add more extensive tests for this. Repository: rC Clang https://reviews.llvm.org/D46394 ___

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang-tidy/tool/ClangTidyMain.cpp:195 +/// This option Enables alpha checkers from the static analyzer, that are +/// experimental. This option is set to false and not visible in help, because This option enables...

r331459 - Allow writing calling convention attributes on function types.

2018-05-03 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Thu May 3 08:33:50 2018 New Revision: 331459 URL: http://llvm.org/viewvc/llvm-project?rev=331459&view=rev Log: Allow writing calling convention attributes on function types. Calling convention attributes notionally appertain to the function type -- they modify the man

[PATCH] D43750: Allow writing calling convention attributes on function types

2018-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. In https://reviews.llvm.org/D43750#1085780, @rsmith wrote: > I'm really sad about this; C++11 attributes were supposed to fix the > undisciplined "do what I mean" behavior of GNU attributes. But you're right, > these really are

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: include/clang/Frontend/DependencyOutputOptions.h:31 unsigned AddMissingHeaderDeps : 1; ///< Add missing headers to dependency list unsigned PrintShowIncludes : 1; ///< Print cl.exe style /showIncludes info. + unsigned

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Felix Bruns via Phabricator via cfe-commits
fxb added inline comments. Comment at: include/clang/Frontend/DependencyOutputOptions.h:31 unsigned AddMissingHeaderDeps : 1; ///< Add missing headers to dependency list unsigned PrintShowIncludes : 1; ///< Print cl.exe style /showIncludes info. + unsigned ---

[PATCH] D45927: [clang-tidy] [modernize-use-auto] Correct way to calculate a type name length for multi-token types

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/modernize-use-auto-min-type-name-length.cpp:61-83 +long int li = static_cast(foo()); +// CHECK-FIXES-0-0: auto li = {{.*}} +/

[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/ClangTidy.cpp:536 + DiagnosticConsumer *DiagConsumer) override { + Invocation->getFrontendOpts().ProgramAction

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > I think the premise is a bit off the mark. It's not that these are not for > the common user -- it's that they're simply not ready for users at all. Then why was it merged into clang in the first place? It seems like the whole point of merging it into clang is to get

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In https://reviews.llvm.org/D46159#1086553, @pfultz2 wrote: > > I think the premise is a bit off the mark. It's not that these are not for > > the common user -- it's that they're simply not ready for users at all. > > Then why was it merged into clang in the first plac

[clang-tools-extra] r331460 - Add a trailing period in release notes.

2018-05-03 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu May 3 08:59:39 2018 New Revision: 331460 URL: http://llvm.org/viewvc/llvm-project?rev=331460&view=rev Log: Add a trailing period in release notes. Modified: clang-tools-extra/trunk/clang-tidy/add_new_check.py Modified: clang-tools-extra/trunk/clang-tidy/add_new_chec

[clang-tools-extra] r331461 - Added trailing periods.

2018-05-03 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu May 3 09:01:49 2018 New Revision: 331461 URL: http://llvm.org/viewvc/llvm-project?rev=331461&view=rev Log: Added trailing periods. Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst Modified: clang-tools-extra/trunk/docs/ReleaseNotes.rst URL: http://llvm.org/v

[PATCH] D46115: [ASTImporter] properly import SrcLoc of Attr

2018-05-03 Thread Rafael Stahl via Phabricator via cfe-commits
r.stahl added a comment. Maybe this is a user error of CrossTU, but it seemed to import a FuncDecl with attributes, causing the imported FuncDecl to have all those attributes twice. That's why I thought merging would maybe make sense. However I did not encounter any issue with the duplicate att

[PATCH] D40937: [clang-tidy] Infinite loop checker

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/bugprone/InfiniteLoopCheck.h:37 +private: + bool updateSequence(Stmt *FunctionBody, ASTContext &ASTCtx); + const Stmt *PrevFunctionBody

[PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-05-03 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine added a comment. In https://reviews.llvm.org/D36610#1083952, @mikhail.ramalho wrote: > Ping. Given that richard smith is the only non-approver, and that he hasn't responded, and that I contributed this code, I'm going to make an executive decision and say that this is OK to submit.

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

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. There are still outstanding comments. https://reviews.llvm.org/D33844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 updated this revision to Diff 145029. pfultz2 added a comment. Rename flag to `allow-enabling-alpha-checks` and removed the option from the clang-tidy file. https://reviews.llvm.org/D46159 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidyOptions.cpp clang-tidy/ClangTidyOptions

[PATCH] D33537: [clang-tidy] Exception Escape Checker

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. It looks like you've missed some comments or uploaded a wrong patch. Comment at: clang-tidy/bugprone/ExceptionEscapeCheck.cpp:105 +const TypeVec throwsException(con

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D46159#1086553, @pfultz2 wrote: > > I think the premise is a bit off the mark. It's not that these are not for > > the common user -- it's that they're simply not ready for users at all. > > Then why was it merged into clang in the first

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Felix Bruns via Phabricator via cfe-commits
fxb updated this revision to Diff 145030. fxb added a comment. Updated the code to use an enum called `ShowIncludesDestination` https://reviews.llvm.org/D46394 Files: include/clang/Frontend/DependencyOutputOptions.h lib/Driver/ToolChains/Clang.cpp lib/Frontend/CompilerInstance.cpp lib/F

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. This looks fine to me. Let me know if you need me to commit this for you. https://reviews.llvm.org/D46394 ___ cfe-commits mailing list cf

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Felix Bruns via Phabricator via cfe-commits
fxb added a comment. @erichkeane That would be great! Thanks! https://reviews.llvm.org/D46394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > When something is merged into Clang trunk, the expectation is that it will be > production quality or will be worked on rapidly to get it to production > quality, which is somewhat orthogonal to getting user feedback. I don't know > that I have the full history of all

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/tool/ClangTidyMain.cpp:195 +/// This option Enables alpha checkers from the static analyzer, that are +/// experimental. This option is set to false and not visible in help, because xbolva00 wrote: > This

[PATCH] D26054: Use `getFileLoc()` instead of `getSpellingLoc()` in the ASTImporter

2018-05-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. I see,t hank you. Please feel free to submit a patch - it seems like you already have a nice test case that shows the difference between two import options. https://reviews.llvm.org/D26054 ___ cfe-commits mailing list cf

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: clang-tidy/tool/ClangTidyMain.cpp:195 +/// This option Enables alpha checkers from the static analyzer, that are +/// experimental. This option is set to false and not visible in help, because lebedev.ri wrote: > xbol

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. In https://reviews.llvm.org/D46159#1086493, @aaron.ballman wrote: > I think the premise is a bit off the mark. It's not that these are not for > the common user -- it's that they're

[PATCH] D46187: [Analyzer] getRegisteredCheckers(): handle debug checkers too.

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. What's the use case for debug CSA checkers in clang-tidy? Repository: rC Clang https://reviews.llvm.org/D46187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D45931: [ASTMatchers] Don't garble the profiling output when multiple TU's are processed

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D45931#1084503, @lebedev.ri wrote: > In https://reviews.llvm.org/D45931#1083192, @lebedev.ri wrote: > > > Thank you for looking at this. > > > > In https://reviews.llvm.org/D45931#1083184, @alexfh wrote: > > > > > From a user's perspective I'd p

[PATCH] D46013: [ARM] Conform to AAPCS when passing overaligned composites as arguments

2018-05-03 Thread Momchil Velikov via Phabricator via cfe-commits
chill added a comment. In https://reviews.llvm.org/D46013#1084440, @efriedma wrote: > I'd like to see some tests for __attribute((packed)). Thanks, indeed it does not work correctly on packed structures. Back to the drawing board ... Repository: rC Clang https://reviews.llvm.org/D46013

r331466 - [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG

2018-05-03 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Thu May 3 10:15:44 2018 New Revision: 331466 URL: http://llvm.org/viewvc/llvm-project?rev=331466&view=rev Log: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG Modified: cfe/trunk/test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp cfe/trunk/test/OpenMP/

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane requested changes to this revision. erichkeane added a comment. This revision now requires changes to proceed. When building this, it didn't build since you'd reused the name. I changed the variable to be named "Dest" instead of "Destination" That said, the test suite now fails on Cl

r331469 - [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG

2018-05-03 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Thu May 3 10:22:04 2018 New Revision: 331469 URL: http://llvm.org/viewvc/llvm-project?rev=331469&view=rev Log: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG Reviewed by: ABataev Differential Revision: https://reviews.llvm.org/D46370 Modified: cfe/trunk/test/OpenM

r331468 - Revert r331466: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG"

2018-05-03 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Thu May 3 10:22:01 2018 New Revision: 331468 URL: http://llvm.org/viewvc/llvm-project?rev=331468&view=rev Log: Revert r331466: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG" Sorry, forgot to add commit log attributes. Modified: cfe/trunk/test/OpenMP/target_teams_d

[PATCH] D46370: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG

2018-05-03 Thread Joel E. Denny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331469: [OPENMP] Fix test typos: CHECK-DAG-N -> CHECK-N-DAG (authored by jdenny, committed by ). Changed prior to commit: https://reviews.llvm.org/D46370?vs=144949&id=145047#toc Repository: rC Clang

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 145049. sepavloff marked an inline comment as done. sepavloff added a comment. Small simplification Repository: rC Clang https://reviews.llvm.org/D46241 Files: lib/CodeGen/CGExprConstant.cpp test/CodeGenCXX/cxx11-initializer-aggregate.cpp Index:

[PATCH] D46159: [clang-tidy] Add a flag to enable alpha checkers

2018-05-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D46159#1086627, @alexfh wrote: > In https://reviews.llvm.org/D46159#1086493, @aaron.ballman wrote: > > > I think the premise is a bit off the mark. It's not that these are not for > > the common user -- it's that they're simply not ready

[PATCH] D46394: [clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

2018-05-03 Thread Felix Bruns via Phabricator via cfe-commits
fxb added a comment. I'll have a look at these issues tomorrow and submit a new patch then. Thanks for all your help so far! https://reviews.llvm.org/D46394 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D46241: [CodeGen] Recognize more cases of zero initialization

2018-05-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked an inline comment as done. sepavloff added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:1403 + if (auto *IL = dyn_cast_or_null(Init)) { +if (InitTy->isConstantArrayType()) { + for (auto I : IL->inits()) rjmccall wrote: >

[PATCH] D46398: [ASTImporterTest] Fix potential use-after-free

2018-05-03 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin created this revision. a.sidorin added reviewers: xazax.hun, martong, szepet, jingham. Herald added subscribers: cfe-commits, rnkovacs. `buildASTFromCodeWithArgs()` accepts `llvm::Twine` as `Code` argument. However, if the argument is not a C string or std::string, the argument is being

[PATCH] D45931: [ASTMatchers] Don't garble the profiling output when multiple TU's are processed

2018-05-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D45931#1086665, @alexfh wrote: > In https://reviews.llvm.org/D45931#1084503, @lebedev.ri wrote: > > > In https://reviews.llvm.org/D45931#1083192, @lebedev.ri wrote: > > > > > Thank you for looking at this. > > > > > > In https://reviews.llvm

[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

2018-05-03 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis updated this revision to Diff 145059. zinovy.nis added a comment. - Added comments on why setting `ProgramAction` explicitly. https://reviews.llvm.org/D46325 Files: clang-tidy/ClangTidy.cpp test/clang-tidy/clang-tidy-__clang_analyzer__macro.cpp Index: test/clang-tidy/clang-tidy

[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

2018-05-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thank you! https://reviews.llvm.org/D46325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

2018-05-03 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. Thanks Alexander for your feedback! https://reviews.llvm.org/D46325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data().

2018-05-03 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. In https://reviews.llvm.org/D45702#1086250, @aaron.ballman wrote: > In https://reviews.llvm.org/D45702#1085890, @shuaiwang wrote: > > > In https://reviews.llvm.org/D45702#1085224, @aaron.ballman wrote: > > > > > > Have you run this over any large code bases to see wheth

[clang-tools-extra] r331474 - [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer

2018-05-03 Thread Zinovy Nis via cfe-commits
Author: zinovy.nis Date: Thu May 3 11:26:39 2018 New Revision: 331474 URL: http://llvm.org/viewvc/llvm-project?rev=331474&view=rev Log: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer This macro is widely used in many well-known projects,

[PATCH] D46325: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer. 2nd try.

2018-05-03 Thread Zinovy Nis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL331474: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility… (authored by zinovy.nis, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit: h

[clang-tools-extra] r331475 - Simplify test clang-tidy-__clang_analyzer__macro.cpp

2018-05-03 Thread Zinovy Nis via cfe-commits
Author: zinovy.nis Date: Thu May 3 11:31:39 2018 New Revision: 331475 URL: http://llvm.org/viewvc/llvm-project?rev=331475&view=rev Log: Simplify test clang-tidy-__clang_analyzer__macro.cpp Modified: clang-tools-extra/trunk/test/clang-tidy/clang-tidy-__clang_analyzer__macro.cpp Modified:

[PATCH] D46042: Cap vector alignment at 16 for all Darwin platforms

2018-05-03 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. > Note that this sort of attribute is stripped from template arguments in > template substitution, so there's a possibility that code templated over > vectors will produce inadequately-aligned objects. I was wondering whether there is a warning clang issues when the al

[PATCH] D46386: Adding __atomic_fetch_min/max intrinsics to clang

2018-05-03 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments. Comment at: lib/Sema/SemaChecking.cpp:3098 + case AtomicExpr::AO__atomic_fetch_umax: +IsMinMax = true; +Form = Arithmetic; Should `__sync_fetch_and_min` and others also set `IsMinMax`? Repository: rC Clang https://reviews.

[PATCH] D46042: Cap vector alignment at 16 for all Darwin platforms

2018-05-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think we should seriously consider making alignment attributes on typedefs (and maybe some other attributes like may_alias) actual type qualifiers that are preserved in the canonical type, mangled, and so on. It would be an ABI break, but it'd also solve a lot of pr

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-03 Thread Caroline Tice via Phabricator via cfe-commits
cmtice created this revision. cmtice added a reviewer: pcc. Herald added a subscriber: cfe-commits. Currently LLVM CFI tries to use an implicit blacklist file, currently in /usr/lib64/clang//share. If the file is not there, LLVM happily continues, which causes CFI to add checks to files/functio

  1   2   >