[PATCH] D15994: Allow for unfinished #if blocks in preambles.

2017-02-07 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Lex/Preprocessor.h:310 + +const Stack &getStack() const { + assert(ConditionalStack); Return an `ArrayRef` rather than exposing the type of the storage (which is an implementation detail), here and

Re: [libcxx] r294107 - Recommit [libcxx] Never use within libc++

2017-02-07 Thread Eric Fiselier via cfe-commits
Hi Jonas, I fixed the filesystem test failures in r294360. You should be able to re-enable LIBCXX_ENABLE_ASSERTIONS. /Eric On Mon, Feb 6, 2017 at 3:25 AM, Eric Fiselier wrote: > I should have made it more clear that this change actually caused 100's of > assertions to be turned on. And good ne

r294361 - [PCH] Fix a regression when PCH is used with -fmodules

2017-02-07 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Tue Feb 7 15:54:57 2017 New Revision: 294361 URL: http://llvm.org/viewvc/llvm-project?rev=294361&view=rev Log: [PCH] Fix a regression when PCH is used with -fmodules Following up on r291465 after a regression in r276159. When we use -fmodule-name=X while building a PCH, modul

r294362 - [ASTReader] Improve ReadASTBlock error message when module not available

2017-02-07 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Tue Feb 7 15:55:02 2017 New Revision: 294362 URL: http://llvm.org/viewvc/llvm-project?rev=294362&view=rev Log: [ASTReader] Improve ReadASTBlock error message when module not available Point to the PCM file that could not be found. rdar://problem/30381981 Modified: cfe/t

[PATCH] D29676: Enable -dump-deserialized-decls and -error-on-deserialized-decl for modules

2017-02-07 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev closed this revision. v.g.vassilev added a comment. Landed in r294359. Repository: rL LLVM https://reviews.llvm.org/D29676 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D21075: Correct invalid end location in diagnostics for some identifiers.

2017-02-07 Thread Richard Smith via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Parse/ParseDecl.cpp:2702 DS.SetRangeStart(Tok.getLocation()); -DS.SetRangeEnd(SourceLocation()); +DS.SetRangeEnd(Tok.getLocation()); } This doesn't look right: this is a source range containing exactly

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-02-07 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. I added support for a callback field in lit's configuration (see https://reviews.llvm.org/D29684), which is used to execute each testcase for each supported constraint solver backends at runtime. I believe this resolves all remaining issues, except for the remaining two te

[PATCH] D29685: Lit C++11 Compatibility - Function Attributes

2017-02-07 Thread Charles Li via Phabricator via cfe-commits
tigerleapgorge created this revision. I am continuing to make Lit tests C++11 compatible. This patch contains 3 tests, previously in review https://reviews.llvm.org/D21626. First two tests involve printf format attributes. The third test involve thread safety attribute. Here are the descriptions

Re: [libcxx] r294138 - Adjust Linux ABI list after r294133

2017-02-07 Thread Hans Wennborg via cfe-commits
Ping? On Mon, Feb 6, 2017 at 2:15 PM, Hans Wennborg wrote: > The diff here is huge compared to the Apple one (r294139). > > Did the file format change and this file was previously not updated? > > This makes it hard to merge the change. Can you advise on how to > generate this file or how to do t

[PATCH] D26418: [clang-tidy] Add '-suppress-checks-filter' option to suppress diagnostics from certain files

2017-02-07 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Adding a mechanism to supply suppression lists would be useful as long as it's flexible and extensible enough and doesn't significantly affect performance (especially, when not in use). In particular, it shouldn't be bound to a specific format or a specific way to store

[libcxx] r294391 - Prevent UBSAN from generating unsigned overflow diagnostics in the hashing internals

2017-02-07 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Feb 7 18:10:10 2017 New Revision: 294391 URL: http://llvm.org/viewvc/llvm-project?rev=294391&view=rev Log: Prevent UBSAN from generating unsigned overflow diagnostics in the hashing internals Added: libcxx/trunk/test/libcxx/utilities/function.objects/unord.hash/

[PATCH] D29692: [clang-tidy] add check modernize-use-const-instead-of-define

2017-02-07 Thread Alexander Lanin via Phabricator via cfe-commits
AlexanderLanin created this revision. Herald added subscribers: JDevlieghere, mgorny. Suggestion for a new check that will warn on #defines that should rather be constant values. Const variables should be preferred as #define does not obey type checking and scope rules. Please feel free to cri

[libcxx] r294393 - Add missing include in

2017-02-07 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Tue Feb 7 18:14:13 2017 New Revision: 294393 URL: http://llvm.org/viewvc/llvm-project?rev=294393&view=rev Log: Add missing include in Modified: libcxx/trunk/include/numeric Modified: libcxx/trunk/include/numeric URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/in

r294395 - P0091R3: Improved syntactic checking of deduction-guides.

2017-02-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 7 18:35:25 2017 New Revision: 294395 URL: http://llvm.org/viewvc/llvm-project?rev=294395&view=rev Log: P0091R3: Improved syntactic checking of deduction-guides. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td cfe/trunk/lib/AST/DeclarationName.c

[PATCH] D29647: [OpenMP] Extend CLANG target options with device offloading kind.

2017-02-07 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added inline comments. Comment at: lib/Driver/ToolChains.cpp:4902 + DeviceOffloadingKind == Action::OFK_Cuda) && + "The offloading kind is not OpenMP or CUDA."); Not sure this assertion message helps us much beyond what's already in the

r294396 - Fix constructor declarator detection for the case when the name is followed by

2017-02-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 7 19:16:55 2017 New Revision: 294396 URL: http://llvm.org/viewvc/llvm-project?rev=294396&view=rev Log: Fix constructor declarator detection for the case when the name is followed by an attribute-specifier-seq. (Also fixes the same problem for deduction-guides.) Modif

r294397 - Diagnose an attempt to give a deduction-guide a function body.

2017-02-07 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Feb 7 19:27:29 2017 New Revision: 294397 URL: http://llvm.org/viewvc/llvm-project?rev=294397&view=rev Log: Diagnose an attempt to give a deduction-guide a function body. Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td cfe/trunk/lib/Sema/SemaDeclCXX

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-02-07 Thread Julian Bangert via Phabricator via cfe-commits
jbangert updated this revision to Diff 87574. jbangert added a comment. Address code feedback & Reformat with clang-format --style llvm. https://reviews.llvm.org/D29621 Files: include/clang/Tooling/RefactoringCallbacks.h lib/Tooling/RefactoringCallbacks.cpp unittests/Tooling/RefactoringCa

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-02-07 Thread Julian Bangert via Phabricator via cfe-commits
jbangert updated this revision to Diff 87575. jbangert added a comment. - change to push_back https://reviews.llvm.org/D29621 Files: include/clang/Tooling/RefactoringCallbacks.h lib/Tooling/RefactoringCallbacks.cpp unittests/Tooling/RefactoringCallbacksTest.cpp Index: unittests/Tooling/R

[PATCH] D29699: [clang-tidy] Add -extra-arg and -extra-arg-before to clang-tidy-diff.py

2017-02-07 Thread Ehsan Akhgari via Phabricator via cfe-commits
ehsan created this revision. Herald added a subscriber: JDevlieghere. These flags allow specifying extra arguments to the tool's command line which don't appear in the compilation database. https://reviews.llvm.org/D29699 Files: clang-tidy/tool/clang-tidy-diff.py Index: clang-tidy/tool/clan

[PATCH] D29699: [clang-tidy] Add -extra-arg and -extra-arg-before to clang-tidy-diff.py

2017-02-07 Thread Ehsan Akhgari via Phabricator via cfe-commits
ehsan added a comment. This is equivalent to https://reviews.llvm.org/D28334 for clang-tidy-diff.py. https://reviews.llvm.org/D29699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-02-07 Thread Julian Bangert via Phabricator via cfe-commits
jbangert marked 2 inline comments as done. jbangert added a comment. (marking other comments as done). https://reviews.llvm.org/D29621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-02-07 Thread Julian Bangert via Phabricator via cfe-commits
jbangert marked 5 inline comments as done. jbangert added a comment. Thank you for the initial feedback! Comment at: include/clang/Tooling/RefactoringCallbacks.h:61 +MatchFinder.addMatcher(Matcher, Callback); +Callbacks.emplace_back(Callback); + } sben

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-02-07 Thread Julian Bangert via Phabricator via cfe-commits
jbangert updated this revision to Diff 87579. jbangert added a comment. - use iter https://reviews.llvm.org/D29621 Files: include/clang/Tooling/RefactoringCallbacks.h lib/Tooling/RefactoringCallbacks.cpp unittests/Tooling/RefactoringCallbacksTest.cpp Index: unittests/Tooling/RefactoringC

Re: Add warning for c++ member variable shadowing

2017-02-07 Thread Saleem Abdulrasool via cfe-commits
On Tue, Feb 7, 2017 at 1:09 PM, Jonathan Roelofs wrote: > > > On 1/24/17 8:10 PM, Saleem Abdulrasool via cfe-commits wrote: > >> Don't use the cast for the check, use isa. Although, since you use the >> value later, it is probably better to write this as: >> >> if (const auto *RD = cast(CurC

[PATCH] D29622: Add a batch query and replace tool based on AST matchers.

2017-02-07 Thread Julian Bangert via Phabricator via cfe-commits
jbangert updated this revision to Diff 87580. jbangert marked 7 inline comments as done. jbangert added a comment. Response to initial code review. https://reviews.llvm.org/D29622 Files: clang-query/CMakeLists.txt clang-query/QueryReplace.cpp clang-query/QueryReplace.h clang-query/repla

[PATCH] D29622: Add a batch query and replace tool based on AST matchers.

2017-02-07 Thread Julian Bangert via Phabricator via cfe-commits
jbangert added a comment. Thank you for the feedback, addressed and reformatted using llvm style. Comment at: clang-query/QueryReplace.h:35-36 + + /// \brief Replacement text. %"identifier" will be substituted by the text of + /// an identifier. + std::string ToTemplate; ---

Re: Add warning for c++ member variable shadowing

2017-02-07 Thread Jonathan Roelofs via cfe-commits
On 2/7/17 7:30 PM, Saleem Abdulrasool wrote: On Tue, Feb 7, 2017 at 1:09 PM, Jonathan Roelofs mailto:jonat...@codesourcery.com>> wrote: On 1/24/17 8:10 PM, Saleem Abdulrasool via cfe-commits wrote: Don't use the cast for the check, use isa. Although, since you use t

Patch for Bug 30413

2017-02-07 Thread Lobron, David via cfe-commits
Hello clang developers, I discovered a bug that affects Objective-C programs compiled with clang on Linux. The current code was not emitting Objective-C class name metadata, which made it impossible for programs to do runtime type introspection. I opened a bug report that describes the proble

[PATCH] D29630: [libcxx] Threading support: externalize sleep_for()

2017-02-07 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF accepted this revision. EricWF added a comment. This revision is now accepted and ready to land. LGTM. @joerg has raised some legitimate concerns about the Windows implementation. However that shouldn't hold this cleanup up, since the implementation is preexisting. Com

[PATCH] D29692: [clang-tidy] add check modernize-use-const-instead-of-define

2017-02-07 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). This check is also should be included into cppcoreguidelines module. Or may be moved there? Comment at: clang-tidy/modernize/UseConstInsteadOfDefineCheck.cpp:41 +/// ot

r294401 - Sema: add warning for c++ member variable shadowing

2017-02-07 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Tue Feb 7 21:30:13 2017 New Revision: 294401 URL: http://llvm.org/viewvc/llvm-project?rev=294401&view=rev Log: Sema: add warning for c++ member variable shadowing Add a warning for shadowed variables across records. Referencing a shadow'ed variable may not give the desire

Re: r294401 - Sema: add warning for c++ member variable shadowing

2017-02-07 Thread Sean Silva via cfe-commits
Nice! On Tue, Feb 7, 2017 at 7:30 PM, Saleem Abdulrasool via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: compnerd > Date: Tue Feb 7 21:30:13 2017 > New Revision: 294401 > > URL: http://llvm.org/viewvc/llvm-project?rev=294401&view=rev > Log: > Sema: add warning for c++ member varia

r294402 - [AVR] Add support for the 'interrupt' and 'naked' attributes

2017-02-07 Thread Dylan McKay via cfe-commits
Author: dylanmckay Date: Tue Feb 7 23:09:26 2017 New Revision: 294402 URL: http://llvm.org/viewvc/llvm-project?rev=294402&view=rev Log: [AVR] Add support for the 'interrupt' and 'naked' attributes Summary: This teaches clang how to parse and lower the 'interrupt' and 'naked' attributes. This al

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

2017-02-07 Thread Dylan McKay via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294402: [AVR] Add support for the 'interrupt' and 'naked' attributes (authored by dylanmckay). Changed prior to commit: https://reviews.llvm.org/D28451?vs=87365&id=87588#toc Repository: rL LLVM http

[PATCH] D29704: [XRay] [clang] Allow logging the first argument of a function call.

2017-02-07 Thread Martin Pelikán via Phabricator via cfe-commits
pelikan created this revision. Functions with the "xray_log_args" attribute will tell LLVM to emit a special XRay sled for compiler-rt to copy any call arguments to your logging handler. https://reviews.llvm.org/D29704 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib

r294403 - [X86] Remove PCOMMIT feature support since Intel has deprecated this instruction with no plans to release products with it.

2017-02-07 Thread Craig Topper via cfe-commits
Author: ctopper Date: Tue Feb 7 23:44:28 2017 New Revision: 294403 URL: http://llvm.org/viewvc/llvm-project?rev=294403&view=rev Log: [X86] Remove PCOMMIT feature support since Intel has deprecated this instruction with no plans to release products with it. Intel's documentation for the deprecat

r294404 - Use LLVM_FALLTHROUGH instead of FALLTHROUGH comments.

2017-02-07 Thread Craig Topper via cfe-commits
Author: ctopper Date: Tue Feb 7 23:44:30 2017 New Revision: 294404 URL: http://llvm.org/viewvc/llvm-project?rev=294404&view=rev Log: Use LLVM_FALLTHROUGH instead of FALLTHROUGH comments. Modified: cfe/trunk/lib/Basic/Targets.cpp Modified: cfe/trunk/lib/Basic/Targets.cpp URL: http://llvm.or

r294411 - [X86] Add -mclflushopt/-mno-clflushopt command line support and __CLFLUSHOPT__ define to match gcc.

2017-02-07 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Feb 8 00:48:58 2017 New Revision: 294411 URL: http://llvm.org/viewvc/llvm-project?rev=294411&view=rev Log: [X86] Add -mclflushopt/-mno-clflushopt command line support and __CLFLUSHOPT__ define to match gcc. Modified: cfe/trunk/docs/ClangCommandLineReference.rst

r294414 - [X86] Remove 'umip' feature flag.

2017-02-07 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Feb 8 01:13:22 2017 New Revision: 294414 URL: http://llvm.org/viewvc/llvm-project?rev=294414&view=rev Log: [X86] Remove 'umip' feature flag. This feature flag indicates that the processor has support for removing certain instructions from user mode software. But the fe

r294413 - [X86] Add -mmovbe/-mno-movbe command line options to match gcc.

2017-02-07 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Feb 8 01:13:19 2017 New Revision: 294413 URL: http://llvm.org/viewvc/llvm-project?rev=294413&view=rev Log: [X86] Add -mmovbe/-mno-movbe command line options to match gcc. Modified: cfe/trunk/include/clang/Driver/Options.td cfe/trunk/test/Driver/x86-target-featur

r294416 - [X86] Add -mclwb/-mno-clwb command line arguments and __CLWB__ define to match gcc.

2017-02-07 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Feb 8 01:36:58 2017 New Revision: 294416 URL: http://llvm.org/viewvc/llvm-project?rev=294416&view=rev Log: [X86] Add -mclwb/-mno-clwb command line arguments and __CLWB__ define to match gcc. In the future, we should also add a clwb intrinsic to the backend, a frontend

[libcxx] r294417 - Temporarily disable the LCM/GCD tests under UBSAN.

2017-02-07 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Feb 8 01:40:59 2017 New Revision: 294417 URL: http://llvm.org/viewvc/llvm-project?rev=294417&view=rev Log: Temporarily disable the LCM/GCD tests under UBSAN. Modified: libcxx/trunk/test/std/numerics/numeric.ops/numeric.ops.gcd/gcd.pass.cpp libcxx/trunk/test/std

<    1   2