[PATCH] D34824: clang-format: add an option -verbose to list the files being processed

2017-07-18 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: tools/clang-format/ClangFormat.cpp:377 break; case 1: Error = clang::format::format(FileNames[0]); sylvestre.ledru wrote: > djasper wrote: > > I think we should restructure the code to not have to duplicate

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-18 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:489 - nextToken(); // Munch the closing brace. + nextToken(InitialLevel); // Munch the closing brace. What happens if you instead change the Line->Level = InitialLevel; statement

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-07-18 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 107032. baloghadamsoftware added a comment. Rearrangement of unsigned comparison removed (FIXME added). Comment regarding the types of integer constants added. https://reviews.llvm.org/D35109 Files:

[PATCH] D35527: [CMake] Move CLANG_ENABLE_(ARCMT|OBJC_REWRITER|STATIC_ANALYZER) into clang/Config/config.h.

2017-07-18 Thread NAKAMURA Takumi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308277: [CMake] Move CLANG_ENABLE_(ARCMT|OBJC_REWRITER|STATIC_ANALYZER) into… (authored by chapuni). Repository: rL LLVM https://reviews.llvm.org/D35527 Files: cfe/trunk/CMakeLists.txt

[PATCH] D35529: [COFF, ARM64] Make +reserve-x18 the default

2017-07-18 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In https://reviews.llvm.org/D35529#812427, @mstorsjo wrote: > Wouldn't it make more sense to set this by default within LLVM, where it's > already enabled by default for darwin? > > Currently there's this code there: > > AArch64Subtarget::AArch64Subtarget(const Triple

[PATCH] D33676: Place implictly declared functions at block scope

2017-07-18 Thread Momchil Velikov via Phabricator via cfe-commits
chill added a comment. Ping. https://reviews.llvm.org/D33676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35533: [Basic] Update CMakeLists.txt to handle Repo

2017-07-18 Thread MinSeong Kim via Phabricator via cfe-commits
minseong.kim created this revision. Herald added a subscriber: mgorny. When repo is used, '--version' option does not display correct version information (i.e. Git hashes). This change makes the parsing of the version info correctly recognise svn, git, git-svn and repo. This in turn enables the

[PATCH] D34439: Add GCC's noexcept-type alias for c++1z-compat-mangling

2017-07-18 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. ping. Any objections to adding this GCC alias? https://reviews.llvm.org/D34439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35529: [COFF, ARM64] Make +reserve-x18 the default

2017-07-18 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I pushed a new patch D35531 . This implements the logic in llvm AArch64SubTarget which seems to be the proper place to do this. Once that patch is reviewed/accepted, I will abandon this one. https://reviews.llvm.org/D35529

[PATCH] D35527: [CMake] Move CLANG_ENABLE_(ARCMT|OBJC_REWRITER|STATIC_ANALYZER) into clang/Config/config.h.

2017-07-18 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. LGTM! Repository: rL LLVM https://reviews.llvm.org/D35527 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35012: [refactor] Add the AST source selection component

2017-07-18 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Tooling/Refactoring/ASTSelection.cpp:100 + SelectionStack.back().Children.push_back(std::move(Node)); +return true; + } arphaman wrote: > klimek wrote: > > Why do we always stop traversal? > False stops

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308269: [Index] Prevent canonical decl becoming nullptr (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D35212 Files: cfe/trunk/lib/Index/IndexingContext.cpp

r308269 - [Index] Prevent canonical decl becoming nullptr

2017-07-18 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Tue Jul 18 00:20:53 2017 New Revision: 308269 URL: http://llvm.org/viewvc/llvm-project?rev=308269=rev Log: [Index] Prevent canonical decl becoming nullptr Summary: This patch prevents getCanonicalDecl returning nullptr in case it finds a canonical TemplateDeclaration with

[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 107030. Typz marked an inline comment as done. Typz added a comment. Add more tests https://reviews.llvm.org/D35483 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/NamespaceEndCommentsFixerTest.cpp Index:

r308277 - [CMake] Move CLANG_ENABLE_(ARCMT|OBJC_REWRITER|STATIC_ANALYZER) into clang/Config/config.h.

2017-07-18 Thread NAKAMURA Takumi via cfe-commits
Author: chapuni Date: Tue Jul 18 01:55:03 2017 New Revision: 308277 URL: http://llvm.org/viewvc/llvm-project?rev=308277=rev Log: [CMake] Move CLANG_ENABLE_(ARCMT|OBJC_REWRITER|STATIC_ANALYZER) into clang/Config/config.h. LLVM_ENABLE_MODULES is sensitive of -D. Move them into config.h. FIXME:

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-18 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 107020. malhar1995 added a comment. Added isTrustedReferenceCountAnnotation() again. Repository: rL LLVM https://reviews.llvm.org/D34937 Files: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp test/Analysis/retain-release-inline.m Index:

[PATCH] D35529: [COFF, ARM64] Make +reserve-x18 the default

2017-07-18 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Wouldn't it make more sense to set this by default within LLVM, where it's already enabled by default for darwin? Currently there's this code there: AArch64Subtarget::AArch64Subtarget(const Triple , const std::string , const

r308268 - Also add the option -no-pie (like -nopie)

2017-07-18 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Mon Jul 17 23:54:54 2017 New Revision: 308268 URL: http://llvm.org/viewvc/llvm-project?rev=308268=rev Log: Also add the option -no-pie (like -nopie) Summary: For example, this option is expected by ghc (haskell compiler). Currently, building with ghc will fail with: ```

[PATCH] D35355: Fix templated type alias completion when using global completion cache

2017-07-18 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. Ping https://reviews.llvm.org/D35355 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35549: [mips] Add support for -m(no-)local-sdata

2017-07-18 Thread Simon Dardis via Phabricator via cfe-commits
sdardis created this revision. Herald added a subscriber: arichardson. Teach the driver to support -m(no-)local-sdata. The backend already matches GCC's default behaviour. https://reviews.llvm.org/D35549 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Clang.cpp

[PATCH] D34439: Add GCC's noexcept-type alias for c++1z-compat-mangling

2017-07-18 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D34439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35012: [refactor] Add the AST source selection component

2017-07-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Tooling/Refactoring/ASTSelection.h:68-74 +/// Traverses the given ASTContext and creates a tree of selected AST nodes. +/// +/// \returns None if no nodes are selected in the AST, or a selected AST node +/// that

[PATCH] D35557: clang-format: merge short case labels with trailing comments

2017-07-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz created this revision. Herald added a subscriber: klimek. Allow merging short case labels when they actually end with a comment (like a comment after the ``break``) and when followed by switch-level comments (e.g. aligned with next case): switch(a) { case 0: break; // comment at end of

[PATCH] D35520: [Sema] Improve diagnostic message for unavailable c++17 aligned allocation functions

2017-07-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Basic/AlignedAllocation.h:25 + +static inline VersionTuple alignedAllocMinVersion(llvm::Triple::OSType OS) { + switch (OS) { Redundant `static`? Comment at:

[PATCH] D35484: Add a warning for missing '#pragma pack (pop)' and suspicious '#pragma pack' uses when including files

2017-07-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 107090. arphaman marked 5 inline comments as done. arphaman added a comment. Address review comments. Repository: rL LLVM https://reviews.llvm.org/D35484 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D21508: Diagnose friend function template redefinitions

2017-07-18 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 107091. sepavloff added a comment. Simplified patch https://reviews.llvm.org/D21508 Files: include/clang/AST/DeclBase.h lib/AST/Decl.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp test/SemaCXX/friend2.cpp Index:

[PATCH] D35484: Add a warning for missing '#pragma pack (pop)' and suspicious '#pragma pack' uses when including files

2017-07-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Repository: rL LLVM https://reviews.llvm.org/D35484 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35012: [refactor] Add the AST source selection component

2017-07-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Tooling/Refactoring/ASTSelection.cpp:164 + unsigned NumMatches = 0; + for (Decl *D : Context.getTranslationUnitDecl()->decls()) { +if (ObjCImplEndLoc.isValid() && klimek wrote: > arphaman wrote: > > klimek

[PATCH] D34440: [Clang] Expand response files before loading compilation database

2017-07-18 Thread Vladimir Plyashkun via Phabricator via cfe-commits
vladimir.plyashkun added a comment. > If you want one unified format, the compilation database is it. Is the `clang-tidy ... -- ` meant to be more or less a drop-in replacement for `clang ` (arguments-wise)? If yes, this expansion of response files here is an another step in this direction.

[PATCH] D34440: [Clang] Expand response files before loading compilation database

2017-07-18 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D34440#812938, @vladimir.plyashkun wrote: > > If you want one unified format, the compilation database is it. > > Is the `clang-tidy ... -- ` meant to be more or less a drop-in > replacement for `clang ` (arguments-wise)? > If yes, this

r308306 - clang-format: [JS] Correctly format JavaScript imports with long module paths

2017-07-18 Thread Martin Probst via cfe-commits
Author: mprobst Date: Tue Jul 18 07:00:19 2017 New Revision: 308306 URL: http://llvm.org/viewvc/llvm-project?rev=308306=rev Log: clang-format: [JS] Correctly format JavaScript imports with long module paths Currently the `UnwrappedLineParser` fails to correctly unwrap JavaScript imports where

[PATCH] D35012: [refactor] Add the AST source selection component

2017-07-18 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Tooling/Refactoring/ASTSelection.cpp:164 + unsigned NumMatches = 0; + for (Decl *D : Context.getTranslationUnitDecl()->decls()) { +if (ObjCImplEndLoc.isValid() && arphaman wrote: > klimek wrote: > > arphaman

[PATCH] D35546: [AArch64] Produce correct defaultlib directives for windows in MSVC style

2017-07-18 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added subscribers: kristof.beyls, rengolin, aemerson. https://reviews.llvm.org/D35546 Files: lib/CodeGen/TargetInfo.cpp test/CodeGen/pragma-comment.c Index: test/CodeGen/pragma-comment.c

[clang-tools-extra] r308290 - Add autoload cookies for clang-include-fixer lisp functions.

2017-07-18 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Tue Jul 18 03:15:07 2017 New Revision: 308290 URL: http://llvm.org/viewvc/llvm-project?rev=308290=rev Log: Add autoload cookies for clang-include-fixer lisp functions. Annotate all public functions with the autoload magic cookie so that update-directory-autoloads will find

[PATCH] D35541: [CMake] Use #cmakedefine01 for CLANG_ENABLE_(ARCMT|OBJC_REWRITER|STATIC_ANALYZER)

2017-07-18 Thread NAKAMURA Takumi via Phabricator via cfe-commits
chapuni created this revision. Herald added a subscriber: mgorny. It'd be better that they are #cmakedefine01 rather than #cmakedefine. (#if FOO rather than #if defined(FOO)) Then we can find missing #include "clang/Config/config.h" in the future. Repository: rL LLVM

[PATCH] D35216: [analyzer] Escape symbols when creating std::initializer_list.

2017-07-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > Approach (2): We could teach the Store to scan itself for bindings to > metadata-symbolic-based regions during scanReachableSymbols() whenever a > region turns out to be reachable. This requires no work on checker side, but > it sounds performance-heavy. Nope, this

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2017-07-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:511 + SSE->getLHS()->getType()->isSignedIntegerOrEnumerationType() || + SSE->getLHS()->getType()->isPointerType()) { + return negV->Negate(BV, F);

[PATCH] D35420: [OpenCL] Fix access qualifiers metadata for kernel arguments with typedef

2017-07-18 Thread Alexey Sotkin via Phabricator via cfe-commits
AlexeySotkin updated this revision to Diff 107044. AlexeySotkin added a comment. Changing case in the variable name https://reviews.llvm.org/D35420 Files: lib/CodeGen/CodeGenFunction.cpp test/CodeGenOpenCL/kernel-arg-info.cl Index: test/CodeGenOpenCL/kernel-arg-info.cl

[PATCH] D35542: libcxxabi: Suppress LLVM_ENABLE_MODULES

2017-07-18 Thread NAKAMURA Takumi via Phabricator via cfe-commits
chapuni created this revision. Herald added a subscriber: mgorny. It's copypasto from libcxx. There's no serious issue. I'd like just to keep module.cache clean for in-tree libcxx builds. Repository: rL LLVM https://reviews.llvm.org/D35542 Files: libcxxabi/trunk/CMakeLists.txt Index:

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 107038. krasimir marked 2 inline comments as done. krasimir added a comment. - Fix formatting https://reviews.llvm.org/D35485 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/FormatTestComments.cpp Index:

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:489 - nextToken(); // Munch the closing brace. + nextToken(InitialLevel); // Munch the closing brace. djasper wrote: > What happens if you instead change the Line->Level =

[PATCH] D35538: [CodeGen][ARM] ARM runtime helper functions are not always soft-fp

2017-07-18 Thread Peter Smith via Phabricator via cfe-commits
peter.smith created this revision. Herald added subscribers: kristof.beyls, aemerson. The ARM Runtime ABI document (IHI0043) defines the AEABI floating point helper functions in section 4.1 Floating-point library. These functions always use the base PCS (soft-fp). However helper functions

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2017-07-18 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added inline comments. Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:511 + SSE->getLHS()->getType()->isSignedIntegerOrEnumerationType() || + SSE->getLHS()->getType()->isPointerType()) { + return negV->Negate(BV,

[PATCH] D33440: clang-format: better handle statement and namespace macros

2017-07-18 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. So, there are two things in this patch: Statement macros and namespace macros. Lets break this out and handle them individually. They really aren't related that much. Statement macros: I think clang-format's handling here is good enough. clang-format does not insert

[PATCH] D33644: Add default values for function parameter chunks

2017-07-18 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. So do we wait until the '=' case is more clear? This change should not break anything if it's fixed in either direction (if '=' will be provided always or never) https://reviews.llvm.org/D33644 ___ cfe-commits mailing list

[PATCH] D35519: Add SEMA checking to attribute 'target'

2017-07-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:2389-2397 def warn_unsupported_target_attribute : Warning<"Ignoring unsupported '%0' in the target attribute string">, InGroup; +def warn_duplicate_target_attribute +:

[PATCH] D33644: Add default values for function parameter chunks

2017-07-18 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 107077. yvvan added a comment. Add TODO about '=' check https://reviews.llvm.org/D33644 Files: lib/Sema/SemaCodeComplete.cpp test/CodeCompletion/functions.cpp test/Index/code-completion.cpp test/Index/complete-optional-params.cpp Index:

[PATCH] D33644: Add default values for function parameter chunks

2017-07-18 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg Comment at: lib/Sema/SemaCodeComplete.cpp:2422 + std::string DefValue{srcText}; + // TODO: remove this check if the Lexer::getSourceText value is fixed and + // this

[PATCH] D34444: Teach codegen to work in incremental processing mode.

2017-07-18 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In https://reviews.llvm.org/D3#812418, @rjmccall wrote: > In https://reviews.llvm.org/D3#795175, @v.g.vassilev wrote: > > > @rjmccall, thanks for the prompt and thorough reply. > > > > In https://reviews.llvm.org/D3#793311, @rjmccall wrote: > > > > >

[PATCH] D34873: Fix miscompiled 32bit binaries by mingw

2017-07-18 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a reviewer: rnk. hans added a comment. From the bug, this is related to Richard's "r289413 - Add two new AST nodes to represent initialization of an array in terms of initialization of each array element", which broke MSVC builds due to under-alignment, which Reid addressed with

[PATCH] D34873: Fix miscompiled 32bit binaries by mingw

2017-07-18 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. The same alignment in other places works fine. i don't know the source of that issue. Should be somewhere in gcc(mingw) but it's not my focus. So this is a workaround that we can make (probably only for mingw builds) https://reviews.llvm.org/D34873

[PATCH] D33644: Add default values for function parameter chunks

2017-07-18 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D33644#812693, @yvvan wrote: > So do we wait until the '=' case is more clear? This change should not break > anything if it's fixed in either direction (if '=' will be provided always or > never) Ok, if you add a TODO I think this is fine

[PATCH] D35548: [mips] Teach the driver to accept -m(no-)gpopt.

2017-07-18 Thread Simon Dardis via Phabricator via cfe-commits
sdardis created this revision. Herald added a subscriber: arichardson. This patch teaches the driver to pass -mgpopt by default to the backend when it is supported, i.e. we are using -mno-abicalls. https://reviews.llvm.org/D35548 Files: include/clang/Driver/Options.td

[PATCH] D35548: [mips] Teach the driver to accept -m(no-)gpopt.

2017-07-18 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:1490 + GPOpt->claim(); + } + Could it be rewritten a bit shorter? ``` bool NoAbiCalls = ABICalls && ABICalls->getOption().matches(options::OPT_mno_abicalls); bool WantGPOpt =

[PATCH] D35012: [refactor] Add the AST source selection component

2017-07-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 107067. arphaman marked 7 inline comments as done. arphaman added a comment. - Address review comments. - Remove the `Location` parameter and `ContainsSelectionPoint` enum value. - Stop traversing early when a declaration that ends after the selection range

[PATCH] D34824: clang-format: add an option -verbose to list the files being processed

2017-07-18 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru updated this revision to Diff 107089. sylvestre.ledru marked an inline comment as done. sylvestre.ledru added a comment. Fixed, thanks for spotting the mistake. Looks like we could improve the testsuite as my mistake hasn't been catched. https://reviews.llvm.org/D34824 Files:

r308266 - [OpenCL] Added extended tests on metadata generation for half data type and arrays.

2017-07-18 Thread Egor Churaev via cfe-commits
Author: echuraev Date: Mon Jul 17 23:04:01 2017 New Revision: 308266 URL: http://llvm.org/viewvc/llvm-project?rev=308266=rev Log: [OpenCL] Added extended tests on metadata generation for half data type and arrays. Reviewers: Anastasia Reviewed By: Anastasia Subscribers: bader, cfe-commits,

[PATCH] D35550: [mips] Add support for -m(no-)extern-data.

2017-07-18 Thread Simon Dardis via Phabricator via cfe-commits
sdardis created this revision. Herald added a subscriber: arichardson. Add support for -m(no-)extern-data when using -mgpopt in the driver. It is enabled by default in the backend. https://reviews.llvm.org/D35550 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Clang.cpp

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2017-07-18 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 107079. baloghadamsoftware added a comment. I think I checked the type of the left side of the difference, not the difference itself. Thus the difference is not a pointer type, it is a signed integer type, the tests pass when I remove that line.

[PATCH] D35536: Don't set TUScope to null when generating a module in incremental processing mode.

2017-07-18 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. This revision is now accepted and ready to land. I think we can rely on a post-commit review here. LGTM! https://reviews.llvm.org/D35536 ___ cfe-commits mailing list

[PATCH] D35484: Add a warning for missing '#pragma pack (pop)' and suspicious '#pragma pack' uses when including files

2017-07-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:716 +def warn_pragma_pack_non_default_at_include : Warning< + "non-default #pragma pack value might change the alignment of records in the " + "included file">, We

[PATCH] D35559: [CMake][Modules] Tweak Modules-unfriendly builds

2017-07-18 Thread NAKAMURA Takumi via Phabricator via cfe-commits
chapuni created this revision. Herald added a subscriber: mgorny. I can commit changes partially. - Add -fmodules-ignore-macro (llvm-config, libclang) Their -DMACROs don't change headers' behavior. Just let them ignored. - Unittests They use -frtti. I thought they may be built w/o modules.

[PATCH] D35520: [Sema] Improve diagnostic message for unavailable c++17 aligned allocation functions

2017-07-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/AlignedAllocation.h:12 +/// \brief Defines a function that returns the minimum OS versions supporting +/// c++17's aligned allocation functions. +/// c++17 -> C++17

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 107087. krasimir added a comment. - Remove TODO test case https://reviews.llvm.org/D35485 Files: lib/Format/UnwrappedLineParser.cpp lib/Format/UnwrappedLineParser.h unittests/Format/FormatTestComments.cpp Index:

[PATCH] D33440: clang-format: better handle statement and namespace macros

2017-07-18 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. t>>! In https://reviews.llvm.org/D33440#812645, @djasper wrote: > So, there are two things in this patch: Statement macros and namespace > macros. Lets break this out and handle them individually. They really aren't > related that much. Indeed, the only "relation" is the

[PATCH] D35012: [refactor] Add the AST source selection component

2017-07-18 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: lib/Tooling/Refactoring/ASTSelection.cpp:164 + unsigned NumMatches = 0; + for (Decl *D : Context.getTranslationUnitDecl()->decls()) { +if (ObjCImplEndLoc.isValid() && arphaman wrote: > klimek wrote: > > Why don't

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-18 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:2378 ScopedLineState BlockState(*this, SwitchToPreprocessorLines); + if (InitialLevel) +Line->Level = *InitialLevel; What happens if we always set the Level to 0

r308313 - CodeGen: Insert addr space cast for automatic/temp var at right position

2017-07-18 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Jul 18 07:46:03 2017 New Revision: 308313 URL: http://llvm.org/viewvc/llvm-project?rev=308313=rev Log: CodeGen: Insert addr space cast for automatic/temp var at right position The uses of alloca may be in different blocks other than the block containing the alloca.

[PATCH] D35564: Suppress -pedantic warnings about GNU extension StmtExpr in glibc's assert macro

2017-07-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Ping - Richard, what'd you reckon? (This came up on another review where -Wzero-as-null-pointer triggered in a system header in libstdc++ I think) https://reviews.llvm.org/D35564 ___ cfe-commits mailing list

[PATCH] D35519: Add SEMA checking to attribute 'target'

2017-07-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. A few small nits, but otherwise LGTM Comment at: lib/Sema/SemaDeclAttr.cpp:2999-3000 +bool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr)

[PATCH] D34824: clang-format: add an option -verbose to list the files being processed

2017-07-18 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Yeah, improving the testsuite generally seems like a good idea. But unrelated to this patch. This looks good now. https://reviews.llvm.org/D34824

[PATCH] D35438: CodeGen: Insert addr space cast for automatic/temp var at right position

2017-07-18 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308313: CodeGen: Insert addr space cast for automatic/temp var at right position (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D35438?vs=106910=107097#toc Repository: rL

[PATCH] D35548: [mips] Teach the driver to accept -m(no-)gpopt.

2017-07-18 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:1490 + GPOpt->claim(); + } + atanasyan wrote: > Could it be rewritten a bit shorter? > > ``` > bool NoAbiCalls = > ABICalls &&

[PATCH] D35519: Add SEMA checking to attribute 'target'

2017-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 107101. erichkeane marked 9 inline comments as done. erichkeane added a comment. Thanks for the feedback Aaron. This should fix everything you had an issue with. -Erich https://reviews.llvm.org/D35519 Files: include/clang/Basic/Attr.td

[PATCH] D35564: Suppress -pedantic warnings about GNU extension StmtExpr in glibc's assert macro

2017-07-18 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg created this revision. See the mail thread starting at http://lists.llvm.org/pipermail/cfe-dev/2017-July/054666.html "[cfe-dev] -pedantic warnings in system headers?": The assert.h in glibc 2.25 defines assert as a GNU-extension "statement expression", see

Re: r308044 - Add documentation for @available

2017-07-18 Thread Nico Weber via cfe-commits
On Mon, Jul 17, 2017 at 8:39 AM, Aaron Ballman wrote: > On Sun, Jul 16, 2017 at 7:49 PM, Nico Weber wrote: > > Aaron, https://clang.llvm.org/docs/AttributeReference.html#availability > > still doesn't have the AttrDocs.td change I made in this change

r308317 - [OPENMP] Generalization of sema analysis of reduction-based clauses,

2017-07-18 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Tue Jul 18 08:32:58 2017 New Revision: 308317 URL: http://llvm.org/viewvc/llvm-project?rev=308317=rev Log: [OPENMP] Generalization of sema analysis of reduction-based clauses, NFC. Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp

[PATCH] D35562: Support GNU extension StmtExpr in constexpr function

2017-07-18 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg created this revision. The assert.h in glibc 2.25 defines assert as a GNU-extension "statement expression", see https://sourceware.org/git/?p=glibc.git;a=commit;h=e077349ce589466eecd47213db4fae6b80ec18c4 "assert.h: allow gcc to detect assert(a = 1) errors". That caused Clang's

[PATCH] D35485: [clang-format] Fix comment levels between '}' and PPDirective

2017-07-18 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir marked 2 inline comments as done. krasimir added inline comments. Comment at: lib/Format/UnwrappedLineParser.cpp:489 - nextToken(); // Munch the closing brace. + nextToken(InitialLevel); // Munch the closing brace. djasper wrote: > krasimir wrote:

Re: r308044 - Add documentation for @available

2017-07-18 Thread via cfe-commits
Its getting an error. Will update in a bit when I can. -Tanya > On Jul 18, 2017, at 8:07 AM, Nico Weber wrote: > >> On Mon, Jul 17, 2017 at 8:39 AM, Aaron Ballman >> wrote: >> On Sun, Jul 16, 2017 at 7:49 PM, Nico Weber

[PATCH] D35519: Add SEMA checking to attribute 'target'

2017-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 2 inline comments as done. erichkeane added a comment. Thanks Aaron! Fixed those things and will be submitting soon. Also ran format on the function in SemaDeclAttr. For some reason it didn't right the first time. https://reviews.llvm.org/D35519

[PATCH] D30946: [ScopePrinting] Added support to print full scopes of types and declarations.

2017-07-18 Thread Simon Schroeder via Phabricator via cfe-commits
schroedersi added a comment. Ping :) https://reviews.llvm.org/D30946 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35012: [refactor] Add the AST source selection component

2017-07-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 107121. arphaman added a comment. Factor out the lexical ordering code into a new visitor and simplify the implementation of the ast selection visitor Repository: rL LLVM https://reviews.llvm.org/D35012 Files:

[PATCH] D35012: [refactor] Add the AST source selection component

2017-07-18 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Oops, I just realised that now there's a small bug with early exits. Since we don't actually have true lexical order for declarations in the @implementation we might exit early after visiting a method in the @implementation before a function that's actually written

[PATCH] D35519: Add SEMA checking to attribute 'target'

2017-07-18 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. If you wouldn't mind I'd like to see this separated out a bit - a) I think we can make the attribute info a struct rather than a pair as a simple change first b) setCPU split c) let's see where we are after that? Also the description makes it sound like you're adding

[PATCH] D35519: Add SEMA checking to attribute 'target'

2017-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane abandoned this revision. erichkeane added a comment. Going to split this into a few patches as Eric requested. https://reviews.llvm.org/D35519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-07-18 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. From my perspective here once you and Erich get some agreement on the checking between your two bits I'm fine :) -eric https://reviews.llvm.org/D35449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35548: [mips] Teach the driver to accept -m(no-)gpopt.

2017-07-18 Thread Simon Dardis via Phabricator via cfe-commits
sdardis updated this revision to Diff 107114. sdardis marked an inline comment as done. sdardis added a comment. Addressed review comment, added warning when combining -mabicalls and -mgpopt. https://reviews.llvm.org/D35548 Files: include/clang/Basic/DiagnosticDriverKinds.td

[PATCH] D35329: [clang-reorder-fields] Enable reordering for plain C structs

2017-07-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. ping Repository: rL LLVM https://reviews.llvm.org/D35329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35519: Add SEMA checking to attribute 'target'

2017-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D35519#813082, @echristo wrote: > If you wouldn't mind I'd like to see this separated out a bit - > a) I think we can make the attribute info a struct rather than a pair as a > simple change first > b) setCPU split > c) let's see where

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-07-18 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a subscriber: erichkeane. echristo added a comment. Adding Erich Keane here on this since he's working on something similar for the target attribute. -eric https://reviews.llvm.org/D35449 ___ cfe-commits mailing list

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-07-18 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. FWIW the duplication in CGCall.cpp of the enum set is painful if you can come up with anything else it'd be awesome. I don't have any good ideas, just a fond wish :) https://reviews.llvm.org/D35449 ___ cfe-commits

r308327 - Add a warning for missing '#pragma pack (pop)' and suspicious uses

2017-07-18 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Jul 18 10:23:51 2017 New Revision: 308327 URL: http://llvm.org/viewvc/llvm-project?rev=308327=rev Log: Add a warning for missing '#pragma pack (pop)' and suspicious uses of '#pragma pack' in included files This commit adds a new -Wpragma-pack warning. It warns in the

[PATCH] D35484: Add a warning for missing '#pragma pack (pop)' and suspicious '#pragma pack' uses when including files

2017-07-18 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308327: Add a warning for missing '#pragma pack (pop)' and suspicious uses (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D35484?vs=107090=107130#toc Repository: rL LLVM

[PATCH] D35533: [Basic] Update CMakeLists.txt to handle Repo

2017-07-18 Thread Jordan Rose via Phabricator via cfe-commits
jordan_rose added a comment. As commented at https://reviews.llvm.org/D34955#798369, this isn't sufficient because it doesn't force a rebuild when new changes are merged in from upstream. It's not //harmful// to stick with the old version information, but if you can find something better that

[PATCH] D34158: For standards compatibility, preinclude if the file is available

2017-07-18 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. OK folks, I was off the grid last week but I'm back now, and at my grindstone again. I haven't received any comments since I updated the patch to remove the checks on "-nostdinc". Look OK to commit? Many thanks for all your reviews --Melanie Repository: rL LLVM

r308328 - Revert r308327

2017-07-18 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Tue Jul 18 10:36:42 2017 New Revision: 308328 URL: http://llvm.org/viewvc/llvm-project?rev=308328=rev Log: Revert r308327 I forgot to test clang-tools-extra which is now failing. Removed: cfe/trunk/test/PCH/suspicious-pragma-pack.c

[PATCH] D35572: Add isValidCPUName and isValidFeature to TargetInfo

2017-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. These two functions are really useful for implementations of attributes (including attribute-target), so add the functionality. https://reviews.llvm.org/D35572 Files: include/clang/Basic/TargetInfo.h lib/Basic/Targets.cpp Index: lib/Basic/Targets.cpp

[PATCH] D35574: Convert attribute 'target' parsing from a 'pair' to a 'struct' to make further improvements easier

2017-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. The attribute 'target' parse function previously returned a pair. Convert this to a 'pair' in order to add more functionality, and improve usability. https://reviews.llvm.org/D35574 Files: include/clang/Basic/Attr.td lib/CodeGen/CGCall.cpp

[PATCH] D35573: Improve SEMA for attribute-target

2017-07-18 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. Add more diagnosis for the non-multiversioning case. https://reviews.llvm.org/D35573 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaDeclAttr.cpp test/Sema/attr-target.c Index: test/Sema/attr-target.c

  1   2   >