r289787 - Re-commit r289252 and r289285, and fix PR31374

2016-12-15 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Thu Dec 15 02:09:08 2016 New Revision: 289787 URL: http://llvm.org/viewvc/llvm-project?rev=289787&view=rev Log: Re-commit r289252 and r289285, and fix PR31374 Added: cfe/trunk/test/CodeGenOpenCL/amdgpu-nullptr.cl Modified: cfe/trunk/include/clang/AST/APValue.h cfe

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-15 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons updated this revision to Diff 81540. malcolm.parsons added a comment. Add FIXME comment. https://reviews.llvm.org/D27166 Files: clang-tidy/modernize/UseAutoCheck.cpp docs/ReleaseNotes.rst docs/clang-tidy/checks/modernize-use-auto.rst test/clang-tidy/modernize-use-auto-ca

[PATCH] D27800: Add overload of TransformToPotentiallyEvaluated for TypeSourceInfo

2016-12-15 Thread Paulo Matos via Phabricator via cfe-commits
pmatos created this revision. pmatos added a reviewer: efriedma. pmatos added a subscriber: cfe-commits. Adds overload of ransformToPotentiallyEvaluated for TypeSourceInfo to properly deal with VLAs in nested calls of sizeof and typeof. Fixes #31042. https://reviews.llvm.org/D27800 Files: in

[PATCH] D26843: Make sizeof expression context partially evaluated

2016-12-15 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. Please refer to the new one: https://reviews.llvm.org/D27800 https://reviews.llvm.org/D26843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27800: Add overload of TransformToPotentiallyEvaluated for TypeSourceInfo

2016-12-15 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. @efriedma Here's the new patch, thanks for your help getting here. https://reviews.llvm.org/D27800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D26843: Make sizeof expression context partially evaluated

2016-12-15 Thread Paulo Matos via Phabricator via cfe-commits
pmatos accepted this revision. pmatos added a reviewer: pmatos. pmatos added a comment. This revision is now accepted and ready to land. Abandoning this revision. https://reviews.llvm.org/D26843 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D26843: Make sizeof expression context partially evaluated

2016-12-15 Thread Paulo Matos via Phabricator via cfe-commits
pmatos closed this revision. pmatos added a comment. This is not supposed to be marked as accepted. https://reviews.llvm.org/D26843 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27754: [clang-format] Implement comment reflowing (again).

2016-12-15 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 81551. krasimir added a comment. - Split BreakableComment back into a BreakableBlockComment and BreakableLineCommentSection - Extract common reflow computation functionality https://reviews.llvm.org/D27754 Files: lib/Format/BreakableToken.cpp lib/Form

[PATCH] D27575: [libcxxabi] Introduce an externally threaded libc++abi variant (take-2)

2016-12-15 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath added a comment. Gentle ping. https://reviews.llvm.org/D27575 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27576: [libcxx] libc++ changes necessary for the externally threaded libcxxabi variant

2016-12-15 Thread Asiri Rathnayake via Phabricator via cfe-commits
rmaprath marked an inline comment as done. rmaprath added a comment. Gentle ping. https://reviews.llvm.org/D27576 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27801: [change-namespace] handling templated type aliases correctly.

2016-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: hokein. ioeric added a subscriber: cfe-commits. This fixes templated type aliases and templated type aliases in classes. https://reviews.llvm.org/D27801 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamesp

[clang-tools-extra] r289797 - [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-15 Thread Malcolm Parsons via cfe-commits
Author: malcolm.parsons Date: Thu Dec 15 04:19:56 2016 New Revision: 289797 URL: http://llvm.org/viewvc/llvm-project?rev=289797&view=rev Log: [clang-tidy] Enhance modernize-use-auto to templated function casts Summary: Use auto when declaring variables that are initialized by calling a templated

[PATCH] D27166: [clang-tidy] Enhance modernize-use-auto to templated function casts

2016-12-15 Thread Malcolm Parsons via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289797: [clang-tidy] Enhance modernize-use-auto to templated function casts (authored by malcolm.parsons). Changed prior to commit: https://reviews.llvm.org/D27166?vs=81540&id=81554#toc Repository: r

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ping. Repository: rL LLVM https://reviews.llvm.org/D27163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27801: [change-namespace] handling templated type aliases correctly.

2016-12-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. LGTM. Comment at: change-namespace/ChangeNamespace.cpp:730 + // Make `FromDecl` the immediate declaration that `Type` refers to, i.e. if + // `Type` is an alias type, we ma

[PATCH] D27801: [change-namespace] handling templated type aliases correctly.

2016-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 81555. ioeric marked 2 inline comments as done. ioeric added a comment. - Comments addressed https://reviews.llvm.org/D27801 Files: change-namespace/ChangeNamespace.cpp unittests/change-namespace/ChangeNamespaceTests.cpp Index: unittests/change-namespac

[clang-tools-extra] r289799 - [change-namespace] handling templated type aliases correctly.

2016-12-15 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Dec 15 04:42:35 2016 New Revision: 289799 URL: http://llvm.org/viewvc/llvm-project?rev=289799&view=rev Log: [change-namespace] handling templated type aliases correctly. Summary: This fixes templated type aliases and templated type aliases in classes. Reviewers: hokein

[PATCH] D27801: [change-namespace] handling templated type aliases correctly.

2016-12-15 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289799: [change-namespace] handling templated type aliases correctly. (authored by ioeric). Changed prior to commit: https://reviews.llvm.org/D27801?vs=81555&id=81557#toc Repository: rL LLVM https:/

[libcxx] r289802 - Fix XFAILS for is_trivially_destructible trait

2016-12-15 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Thu Dec 15 05:00:07 2016 New Revision: 289802 URL: http://llvm.org/viewvc/llvm-project?rev=289802&view=rev Log: Fix XFAILS for is_trivially_destructible trait Modified: libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.cnstr/dtor.pass.cpp libcxx/trunk/test/std/u

[PATCH] D27673: [clang-move] Only move used helper declarations.

2016-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Second rounds. Will start reviewing `CallGraph` code next. Comment at: clang-move/ClangMove.cpp:492 + isDefinition(), unless(InMovedClass), InOldCC, + anyOf(isStaticStorageClass(), hasParent(namespaceDecl(isAnonymous(); + auto HelperFuncOr

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-15 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: include/clang/Sema/AnalysisBasedWarnings.h:93 - void IssueWarnings(Policy P, FunctionScopeInfo *fscope, - const Decl *D, const BlockExpr *blkExpr); + void IssueWarnings(Policy P, FunctionScopeInfo *fscope, Dec

r289809 - [TESTS] Initial commit of tests, by Andrew Tischenko

2016-12-15 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Dec 15 06:06:27 2016 New Revision: 289809 URL: http://llvm.org/viewvc/llvm-project?rev=289809&view=rev Log: [TESTS] Initial commit of tests, by Andrew Tischenko Added: cfe/trunk/test/CodeGen/vector-sqrt.c Added: cfe/trunk/test/CodeGen/vector-sqrt.c URL: http://llvm

r289812 - Revert "[TESTS] Initial commit of tests, by Andrew Tischenko"

2016-12-15 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Dec 15 06:24:20 2016 New Revision: 289812 URL: http://llvm.org/viewvc/llvm-project?rev=289812&view=rev Log: Revert "[TESTS] Initial commit of tests, by Andrew Tischenko" This reverts commit 5898c713bee5e96aae87c73e11f3f4a7d19c74ed. Removed: cfe/trunk/test/CodeGen/ve

[PATCH] D27752: [clang] Use after move bug fixes

2016-12-15 Thread Stanisław Barzowski via Phabricator via cfe-commits
sbarzowski accepted this revision. sbarzowski added a reviewer: sbarzowski. sbarzowski added a comment. LGTM https://reviews.llvm.org/D27752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang-tools-extra] r289816 - [change-namespace] fix a case references to templated using alias are qualified types.

2016-12-15 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Dec 15 07:02:41 2016 New Revision: 289816 URL: http://llvm.org/viewvc/llvm-project?rev=289816&view=rev Log: [change-namespace] fix a case references to templated using alias are qualified types. Modified: clang-tools-extra/trunk/change-namespace/ChangeNamespace.cpp

[PATCH] D27806: [clang-tidy] Add misc-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. Prazek added reviewers: alexfh, malcolm.parsons. Prazek added a subscriber: cfe-commits. Herald added subscribers: JDevlieghere, mgorny. Warns if algorithm is used with ``.begin()`` and ``.end()`` from different variables. https://reviews.llvm.org/D27806 Files: c

[PATCH] D19667: [ubsan] Minimize size of data for type_mismatch

2016-12-15 Thread Filipe Cabecinhas via Phabricator via cfe-commits
filcab abandoned this revision. filcab added a comment. I will post a new patch, using the features from https://reviews.llvm.org/rL289444. https://reviews.llvm.org/D19667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D27810: Normalize all filenames before searching FileManager caches

2016-12-15 Thread Erik Verbruggen via Phabricator via cfe-commits
erikjv created this revision. erikjv added reviewers: bkramer, klimek. erikjv added a subscriber: cfe-commits. The problem on windows is that both forward-slashes and back-slashes are accepted as path separators. However, the FileManager stores the path as reported by the OS after opening the file

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 81584. arphaman marked 3 inline comments as done. arphaman added a comment. The updated patch removes the dependency on the "-Wreturn-type" diagnostic and verifies that functions that return a type with a non-trivial default constructor are always optimized

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-15 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Sema/AnalysisBasedWarnings.h:93 - void IssueWarnings(Policy P, FunctionScopeInfo *fscope, - const Decl *D, const BlockExpr *blkExpr); + void IssueWarnings(Policy P, FunctionScopeInfo *fscope, Decl *

[PATCH] D27806: [clang-tidy] Add misc-invalid-range

2016-12-15 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: clang-tidy/ClangTidy.cpp:296 const auto &RegisteredCheckers = - AnalyzerOptions::getRegisteredCheckers(/*IncludeExperimental=*/false); + AnalyzerOptions::getRegisteredCheckers(/*IncludeExperimental=*/true); bool A

[PATCH] D27767: NFC Changes from modernize-use-auto

2016-12-15 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp:106 if (Optional P = Succ->getLocationAs()) +if (const auto *BO = P->getStmtAs()) { The check missed this one. https://reviews.llvm.org/D27767

Re: [clang-tools-extra] r289656 - modernize-use-auto NFC fixes

2016-12-15 Thread Alexander Kornienko via cfe-commits
For most loop changes here applying modernize-loop-convert would be better ;) On Wed, Dec 14, 2016 at 4:29 PM, Piotr Padlewski via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: prazek > Date: Wed Dec 14 09:29:23 2016 > New Revision: 289656 > > URL: http://llvm.org/viewvc/llvm-project

[PATCH] D27812: [test] Extend llvm_shlib_dir fix to unittests

2016-12-15 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: chapuni, gribozavr, ddunbar, beanz. mgorny added a subscriber: cfe-commits. Extend the fix from https://reviews.llvm.org/rL286952 to unittests. The fix added clang built library directories (via llvm_shlib_dir) to LD_LIBRARY_PATH. The previous

[PATCH] D27673: [clang-move] Only move used helper declarations.

2016-12-15 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clang-move/UsedHelperDeclFinder.cpp:22 +// by a single node which belongs to that class. +const Decl *getOutmostEnclosingClassOrFunDecl(const Decl *D) { + const auto *DC = D->getDeclContext(); Maybe just `getOutermostDec

r289829 - CodeGen: ubsan is built static on windows, give handlers local storage

2016-12-15 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Thu Dec 15 10:30:20 2016 New Revision: 289829 URL: http://llvm.org/viewvc/llvm-project?rev=289829&view=rev Log: CodeGen: ubsan is built static on windows, give handlers local storage The UBSAN runtime is built static on Windows. This requires that we give local storage alw

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-15 Thread Firat Kasmis via Phabricator via cfe-commits
firolino updated this revision to Diff 81591. firolino added a comment. - small improvements - re-added lost handling for: bool defPre = false, #ifdef IS_ENABLED defTest = false; #else defTest = true; #endif - added support for new test cases: int /* :: */ S::*pp2 =

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-15 Thread Firat Kasmis via Phabricator via cfe-commits
firolino added a comment. Unfortunately, I am not able to make getUserWrittenType easier right now. TypeLoc does not give me the desired range. See also: - http://lists.llvm.org/pipermail/cfe-dev/2013-March/028467.html - http://lists.llvm.org/pipermail/cfe-dev/2010-April/008664.html - https://re

[PATCH] D27813: [clang-tidy] fix missing anchor for MPI Module

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. Prazek added reviewers: alexfh, Alexander_Droste, hokein. Prazek added a subscriber: cfe-commits. Herald added a subscriber: JDevlieghere. MPIModule was not linked to plugins https://reviews.llvm.org/D27813 Files: clang-tidy/plugin/ClangTidyPlugin.cpp Index: cl

[PATCH] D24084: [CMake] Cleanup libunwind lookup code.

2016-12-15 Thread Logan Chien via Phabricator via cfe-commits
logan added a comment. Hi @rengolin: Yeah. It is a kind of similar. Another route is to move the code from `/include/unwind.h` to `/lib/Headers` and then ship a shim layer with `libc++abi` and/or `libunwind` for old clang. https://reviews.llvm.org/D24084 _

[PATCH] D24083: [CMake] Fix libc++abi __aeabi_idiv() link error.

2016-12-15 Thread Logan Chien via Phabricator via cfe-commits
logan added a comment. Sorry, I don't have time to work on this recently. Here's the plan: 1. Add another flag to specify the path to `libclang_rt-builtin.a`. 2. If that flag was not specified and the compiler is `clang`, then run `clang -###` to extract for `-L` option and `-l` option for `li

[PATCH] D24487: [Clang] Fix some Clang-tidy modernize-use-bool-literals and Include What You Use warnings in AST; other minor fixes

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: lib/ASTMatchers/Dynamic/Parser.cpp:617 -} // namespace dynamic -} // namespace ast_matchers -} // namespace clang +} // end namespace dynamic +} // end namespace ast_matchers I think check should not warn in these ca

[PATCH] D27767: NFC Changes from modernize-use-auto

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp:106 if (Optional P = Succ->getLocationAs()) +if (const auto *BO = P->getStmtAs()) { malcolm.parsons wrote: > The check missed this one. I don't think it is

[PATCH] D27180: Testbed and skeleton of a new expression parser

2016-12-15 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Could you move the Build* functions in a utility class/namespace. I need something very similar for my ongoing work on the libInterpreter patch and I'd like to reuse that part of the patch. Repository: rL LLVM https://reviews.llvm.org/D27180

[PATCH] D27806: [clang-tidy] Add misc-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked an inline comment as done. Prazek added inline comments. Comment at: clang-tidy/ClangTidy.cpp:296 const auto &RegisteredCheckers = - AnalyzerOptions::getRegisteredCheckers(/*IncludeExperimental=*/false); + AnalyzerOptions::getRegisteredCheckers(/*Includ

[PATCH] D27815: [clang-tidy] Add obvious module for obvious bugs

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek created this revision. Prazek added reviewers: alexfh, malcolm.parsons. Prazek added a subscriber: cfe-commits. Herald added subscribers: JDevlieghere, mgorny. Module for checks for obvious bugs that probably won't be found in working code, but can be found while looking for an obvious bug

[PATCH] D27806: [clang-tidy] Add misc-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 81597. Prazek added a comment. - Moved to obvious https://reviews.llvm.org/D27806 Files: clang-tidy/ClangTidy.cpp clang-tidy/obvious/CMakeLists.txt clang-tidy/obvious/InvalidRangeCheck.cpp clang-tidy/obvious/InvalidRangeCheck.h clang-tidy/obvious/O

[PATCH] D27800: Add overload of TransformToPotentiallyEvaluated for TypeSourceInfo

2016-12-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Can you add a test case? https://reviews.llvm.org/D27800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D25475: [analyzer] Add a new SVal to support pointer-to-member operations.

2016-12-15 Thread Kirill Romanenkov via Phabricator via cfe-commits
kromanenkov updated this revision to Diff 81598. kromanenkov added a comment. Fix issues pointed by @dcoughlin and rebase patch on master. https://reviews.llvm.org/D25475 Files: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h include/clang/StaticAnalyzer/Core/PathSensiti

[PATCH] D27806: [clang-tidy] Add misc-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked 2 inline comments as done. Prazek added inline comments. Comment at: docs/ReleaseNotes.rst:84 +- New `misc-invalid-range + `_ check malcolm.parsons wrote: > "invalid" < "use"

[PATCH] D27806: [clang-tidy] Add misc-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 81600. Prazek added a comment. - Small fixes https://reviews.llvm.org/D27806 Files: clang-tidy/obvious/CMakeLists.txt clang-tidy/obvious/InvalidRangeCheck.cpp clang-tidy/obvious/InvalidRangeCheck.h clang-tidy/obvious/ObviousTidyModule.cpp docs/Rele

[PATCH] D27773: [analyzer] Add checker modeling gtest APIs.

2016-12-15 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Thank you Devin! Comment at: lib/StaticAnalyzer/Checkers/GTestChecker.cpp:30 +// +// The gtest unit testing API provides macros for assertions that that expand +// into an if statement that calls a series of constructors and returns "

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-15 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. My 2 cents: If making this a target-specific default is not OK, why not turn on -fno-strict-return if -fapple-kext is specified? I believe that would cover the critical use case in question. Repository: rL LLVM https://reviews.llvm.org/D27163 ___

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. What about arguments 3 and 4 of `std::list::splice(It, list, It, It)`? Comment at: clang-tidy/obvious/ObviousTidyModule.cpp:24 void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override { -// Add obvious checks here. +Ch

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked 3 inline comments as done. Prazek added inline comments. Comment at: docs/ReleaseNotes.rst:84 +- New `misc-invalid-range + `_ check malcolm.parsons wrote: > Prazek wrote: > >

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 81603. Prazek marked 2 inline comments as done. Prazek added a comment. - Small fixes https://reviews.llvm.org/D27806 Files: clang-tidy/obvious/CMakeLists.txt clang-tidy/obvious/InvalidRangeCheck.cpp clang-tidy/obvious/InvalidRangeCheck.h clang-tidy/

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek marked an inline comment as done. Prazek added a comment. In https://reviews.llvm.org/D27806#623838, @malcolm.parsons wrote: > What about arguments 3 and 4 of `std::list::splice(It, list, It, It)`? I am aware of that, but I wanted to make a bunch of simple checks to fill obvious module

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2016-12-15 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. Thank you for your work, Zoltán! Did you checked if same warnings may be emitted by another checkers? For example, ArrayBoundChecker may warn if index is tainted. I also have some comments below. Comment at: lib/StaticAnalyzer/Checkers/DirtyScalarChe

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 81604. Prazek added a comment. - Small fixes https://reviews.llvm.org/D27806 Files: clang-tidy/obvious/CMakeLists.txt clang-tidy/obvious/InvalidRangeCheck.cpp clang-tidy/obvious/InvalidRangeCheck.h clang-tidy/obvious/ObviousTidyModule.cpp docs/Rele

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-15 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini accepted this revision. mehdi_amini added a comment. This revision is now accepted and ready to land. LGTM. Comment at: lib/CodeGen/CodeGenFunction.cpp:1086 + } + return true; +} Just a nit: reversing the if condition allows early exit. Reposito

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a comment. In https://reviews.llvm.org/D27806#623856, @Prazek wrote: > So does FIXIT comment satisfies you for this patch? Yes. Comment at: clang-tidy/obvious/InvalidRangeCheck.cpp:80 +void InvalidRangeCheck::check(const MatchFinder::MatchResult &Result

[PATCH] D26753: ASTImporter: improve support for C++ templates

2016-12-15 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added a comment. I didn't notice this failure but I'll recheck this. Thank you Kareem! https://reviews.llvm.org/D26753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27621: [clang-tidy] check to find declarations declaring more than one name

2016-12-15 Thread Firat Kasmis via Phabricator via cfe-commits
firolino updated this revision to Diff 81605. firolino added a comment. Added fix and test case for `const int * const`. https://reviews.llvm.org/D27621 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/OneNamePerDeclarationCheck.cpp clang-tidy/readability/OneNamePerDecl

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: test/clang-tidy/misc-invalid-range.cpp:41 + auto &v2 = v; + std::move(v.begin(), v2.end(), v2.begin()); + // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: call to algorithm with begin and end from different objects [misc-invalid-

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 81606. Prazek added a comment. - Small fixes https://reviews.llvm.org/D27806 Files: clang-tidy/obvious/CMakeLists.txt clang-tidy/obvious/InvalidRangeCheck.cpp clang-tidy/obvious/InvalidRangeCheck.h clang-tidy/obvious/ObviousTidyModule.cpp docs/Rele

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: test/clang-tidy/misc-invalid-range.cpp:41 + auto &v2 = v; + std::move(v.begin(), v2.end(), v2.begin()); + // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: call to algorithm with begin and end from different objects [misc-invalid-range] --

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-15 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. (Wait a little in case @Quuxplusone still has comments.) Repository: rL LLVM https://reviews.llvm.org/D27163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: docs/clang-tidy/checks/list.rst:68 misc-inefficient-algorithm + misc-invalid-range misc-macro-parentheses misc. add_new_check.py can fix it. https://reviews.llvm.org/D27806

r289836 - Fix typo in comment. NFC.

2016-12-15 Thread Kelvin Li via cfe-commits
Author: kli Date: Thu Dec 15 11:55:32 2016 New Revision: 289836 URL: http://llvm.org/viewvc/llvm-project?rev=289836&view=rev Log: Fix typo in comment. NFC. Modified: cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp Modified: cfe/trunk/lib/CodeGen/CGStmtOpenMP.cpp URL: http://llvm.org/viewvc/llvm-pro

[PATCH] D25435: Add -femit-accurate-debug-info to emit more debug info for sample pgo profile collection

2016-12-15 Thread Dehao Chen via Phabricator via cfe-commits
danielcdh updated this revision to Diff 81609. danielcdh added a comment. update option name https://reviews.llvm.org/D25435 Files: include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.def lib/CodeGen/BackendUtil.cpp lib/CodeGen/CGDebugInfo.cpp lib/Driver/Tools.cpp

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-15 Thread Mads Ravn via Phabricator via cfe-commits
madsravn updated this revision to Diff 81610. madsravn added a comment. Updated the matcher to find suggested occurences. https://reviews.llvm.org/D27210 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/StringCompareCheck.cpp clang-tidy/misc/Strin

[PATCH] D27753: [analyzer] alpha.security.DirtyScalar Checker

2016-12-15 Thread Anna Zaks via Phabricator via cfe-commits
zaks.anna added a comment. > Did you checked if same warnings may be emitted by another checkers? For > example, > ArrayBoundChecker may warn if index is tainted. I second that. The GenericTaintChecker also reports uses of tainted values. It is not clear that we should add a new separate chec

r289839 - [Driver] Bump default x86 cpu to Penryn when targeting macosx10.12+.

2016-12-15 Thread Ahmed Bougacha via cfe-commits
Author: ab Date: Thu Dec 15 12:14:27 2016 New Revision: 289839 URL: http://llvm.org/viewvc/llvm-project?rev=289839&view=rev Log: [Driver] Bump default x86 cpu to Penryn when targeting macosx10.12+. 10.12 dropped support for all pre-Penryn Macs. Modified: cfe/trunk/lib/Driver/Tools.cpp cf

[PATCH] D24487: [Clang] Fix some Clang-tidy modernize-use-bool-literals and Include What You Use warnings in AST; other minor fixes

2016-12-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: lib/ASTMatchers/Dynamic/Parser.cpp:617 -} // namespace dynamic -} // namespace ast_matchers -} // namespace clang +} // end namespace dynamic +} // end namespace ast_matchers Prazek wrote: > I think check sho

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: docs/clang-tidy/checks/list.rst:68 misc-inefficient-algorithm + misc-invalid-range misc-macro-parentheses malcolm.parsons wrote: > misc. > add_new_check.py can fix it. How? I added new check with this script, bu

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/misc/InvalidRangeCheck.cpp:78 +void InvalidRangeCheck::check(const MatchFinder::MatchResult &Result) { + + const auto *FirstArg = Result.Nodes.getNodeAs("first_arg"); Please remove empty line. ==

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 81616. Prazek marked an inline comment as done. Prazek added a comment. - removed misc https://reviews.llvm.org/D27806 Files: clang-tidy/obvious/CMakeLists.txt clang-tidy/obvious/InvalidRangeCheck.cpp clang-tidy/obvious/InvalidRangeCheck.h clang-tidy

[PATCH] D27569: [OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.

2016-12-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaOverload.cpp:1784 FromType = ToType; + } else if (ToType->isQueueT() && + From->isIntegerConstantExpr(S.getASTContext()) && Is this covered with testing? I have a feeling we might need a

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-15 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. LGTM. I wonder if rsmith is happy with the exact semantics of "shouldUseUndefinedBehaviorReturnOptimization"... but that seems like a tiny nit that's fixable post-commit anyway. Comment at: include/clang/Driver/Options.td:1324 + HelpText<"Use C+

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek updated this revision to Diff 81617. Prazek marked an inline comment as done. Prazek added a comment. - Small fixes https://reviews.llvm.org/D27806 Files: clang-tidy/obvious/CMakeLists.txt clang-tidy/obvious/InvalidRangeCheck.cpp clang-tidy/obvious/InvalidRangeCheck.h clang-tidy/

[PATCH] D27813: [clang-tidy] fix missing anchor for MPI Module

2016-12-15 Thread Alexander Droste via Phabricator via cfe-commits
Alexander_Droste added a comment. Thanks for adding! https://reviews.llvm.org/D27813 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. Also please review https://reviews.llvm.org/D27815 to make it happen https://reviews.llvm.org/D27806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27794: Make some diagnostic tests C++11 clean

2016-12-15 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a reviewer: ABataev. probinson added a comment. +abataev for OpenMP. https://reviews.llvm.org/D27794 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24487: [Clang] Fix some Clang-tidy modernize-use-bool-literals and Include What You Use warnings in AST; other minor fixes

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. I would say that as long as most of the people don't see big difference between "end namespace X" and "namespace X" or even "X" then we should not be so strict. For me "end" is redundant. Even checks added by add_new_check uses "namespace clang" instead of "end namespac

[PATCH] D27813: [clang-tidy] fix missing anchor for MPI Module

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D27813#623978, @Alexander_Droste wrote: > Thanks for adding! I also forgot about that one once. It is simple bugfix so I guess I need small LGTM to push it https://reviews.llvm.org/D27813 ___ c

r289847 - [CUDA] Add --ptxas-path= flag.

2016-12-15 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Thu Dec 15 12:44:57 2016 New Revision: 289847 URL: http://llvm.org/viewvc/llvm-project?rev=289847&view=rev Log: [CUDA] Add --ptxas-path= flag. Summary: This lets you build with one CUDA installation but use ptxas from another install. This is useful e.g. if you want to avoid

[PATCH] D27788: [CUDA] Add --ptxas-path= flag.

2016-12-15 Thread Justin Lebar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289847: [CUDA] Add --ptxas-path= flag. (authored by jlebar). Changed prior to commit: https://reviews.llvm.org/D27788?vs=81501&id=81620#toc Repository: rL LLVM https://reviews.llvm.org/D27788 Files:

Re: [clang-tools-extra] r289656 - modernize-use-auto NFC fixes

2016-12-15 Thread Piotr Padlewski via cfe-commits
Sure, I am planning to do so. I just wanted to firstly make all auto's and the change was small enough that I though you would not mind pushing it without review. BTW the same thing in clang needs review: https://reviews.llvm.org/D27767 2016-12-15 17:08 GMT+01:00 Alexander Kornienko : > For most

[PATCH] D27163: Introduce -f[no-]strict-return flag that controls code generation for C++'s undefined behaviour return optimisation

2016-12-15 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added inline comments. Comment at: include/clang/Driver/Options.td:1324 + HelpText<"Use C++ undefined behaviour optimization for control flow paths" + "that reach the end of the function without executing a required return">; +def fno_strict_return : Flag<["-"],

[PATCH] D27796: Fix printf specifier handling: invalid specifier should not be marked as "consuming data arguments"

2016-12-15 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D27796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

r289850 - Fix printf specifier handling: invalid specifier should not be marked as "consuming data arguments"

2016-12-15 Thread Mehdi Amini via cfe-commits
Author: mehdi_amini Date: Thu Dec 15 12:54:00 2016 New Revision: 289850 URL: http://llvm.org/viewvc/llvm-project?rev=289850&view=rev Log: Fix printf specifier handling: invalid specifier should not be marked as "consuming data arguments" Reviewers: rsmith, bruno, dexonsmith Subscribers: cfe-com

Re: [libcxx] r286789 - Add check-cxx-abilist target when supported.

2016-12-15 Thread Chris Bieneman via cfe-commits
(+Bogner, I think he originally added this) My understanding is that we only did this copy step if you are building with a clang that isn't installed so that the non-installed clang could find these headers. I'm pretty sure compiler-rt finds libcxx via the sources, not the build directory. I'

[PATCH] D27796: Fix printf specifier handling: invalid specifier should not be marked as "consuming data arguments"

2016-12-15 Thread Mehdi AMINI via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL289850: Fix printf specifier handling: invalid specifier should not be marked as… (authored by mehdi_amini). Changed prior to commit: https://reviews.llvm.org/D27796?vs=81532&id=81621#toc Repository:

[PATCH] D27740: [analyzer] Include type name in Retain Count Checker diagnostics

2016-12-15 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D27740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D27600: [analyzer] Refine the diagnostics in the nullability checker to differentiate between nil and null

2016-12-15 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin accepted this revision. dcoughlin added a comment. This revision is now accepted and ready to land. Looks good. While you are here, you might consider changing: the checkBind() diagnostic to match the other diagnostics: "Null assigned to a pointer which is expected to have non-null va

[PATCH] D27210: [clang-tidy] misc-string-compare. Adding a new check to clang-tidy

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added a comment. Good job. I think it is resonable to warn in cases like: if (str.compare(str2) == 1) or even if(str.compare(str2) == -1) Sometimes people check for 1 or -1 instead of > 0 and < 0. If I remember corectly PVS studio found some bugs like this. Comm

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added inline comments. Comment at: docs/clang-tidy/checks/list.rst:68 misc-inefficient-algorithm + misc-invalid-range misc-macro-parentheses Prazek wrote: > malcolm.parsons wrote: > > misc. > > add_new_check.py can fix it. > How? I added

[PATCH] D27812: [test] Extend llvm_shlib_dir fix to unittests

2016-12-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. Looks reasonable to me. https://reviews.llvm.org/D27812 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailm

[PATCH] D27806: [clang-tidy] Add obvious-invalid-range

2016-12-15 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: docs/clang-tidy/checks/list.rst:68 misc-inefficient-algorithm + misc-invalid-range misc-macro-parentheses malcolm.parsons wrote: > Prazek wrote: > > malcolm.parsons wrote: > > > misc. > > > add_new_check.py can

[PATCH] D27821: [OpenMP] support is_device_ptr clause with 'target parallel' pragma

2016-12-15 Thread Kelvin Li via Phabricator via cfe-commits
kkwli0 created this revision. kkwli0 added reviewers: ABataev, hfinkel, carlo.bertolli, sfantao, arpith-jacob, mikerice. kkwli0 added a subscriber: cfe-commits. This patch is to add support of the 'is_device_ptr' clause in the 'target parallel' pragma. https://reviews.llvm.org/D27821 Files:

  1   2   >