Re: [PATCH] D17926: [clang-tidy] Don't delete unused parameter in class override method in anonymous namespace.

2016-04-01 Thread Haojian Wu via cfe-commits
hokein updated this revision to Diff 52332. hokein added a comment. Code format. http://reviews.llvm.org/D17926 Files: clang-tidy/misc/UnusedParametersCheck.cpp test/clang-tidy/misc-unused-parameters.cpp Index: test/clang-tidy/misc-unused-parameters.cpp

[clang-tools-extra] r265117 - [clang-tidy] Don't delete unused parameter in class override method in anonymous namespace.

2016-04-01 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Apr 1 02:57:30 2016 New Revision: 265117 URL: http://llvm.org/viewvc/llvm-project?rev=265117&view=rev Log: [clang-tidy] Don't delete unused parameter in class override method in anonymous namespace. Summary: Fixes PR26740. Reviewers: alexfh Subscribers: cfe-commits D

Re: [PATCH] D17926: [clang-tidy] Don't delete unused parameter in class override method in anonymous namespace.

2016-04-01 Thread Haojian Wu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL265117: [clang-tidy] Don't delete unused parameter in class override method in… (authored by hokein). Changed prior to commit: http://reviews.llvm.org/D17926?vs=52332&id=52336#toc Repository: rL LLVM

Re: [PATCH] D17926: [clang-tidy] Don't delete unused parameter in class override method in anonymous namespace.

2016-04-01 Thread Haojian Wu via cfe-commits
hokein marked an inline comment as done. hokein added a comment. Repository: rL LLVM http://reviews.llvm.org/D17926 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18110: [OpenMP] Fix SEMA bug in the capture of global variables in template functions.

2016-04-01 Thread Alexey Bataev via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:816-822 @@ -801,6 +815,9 @@ + + // A DSA refers to this captured region if the parent contexts match. + auto *ParentContext = RSI->TheCapturedDecl->getParent(); for (auto I = Stack.rbegin(), EE = Stack.rend();

r265121 - [OPENMP 4.5] Allow data members as loop counters in loop-based

2016-04-01 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Apr 1 04:23:34 2016 New Revision: 265121 URL: http://llvm.org/viewvc/llvm-project?rev=265121&view=rev Log: [OPENMP 4.5] Allow data members as loop counters in loop-based directives. OpenMP 4.5 allows privatization of non-static data members in non-static member function

r265123 - [OPENMP] Avoid useless recursive calls in getDSA if it is called in a loop, NFC

2016-04-01 Thread Dmitry Polukhin via cfe-commits
Author: dpolukhin Date: Fri Apr 1 04:52:30 2016 New Revision: 265123 URL: http://llvm.org/viewvc/llvm-project?rev=265123&view=rev Log: [OPENMP] Avoid useless recursive calls in getDSA if it is called in a loop, NFC Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp Modified: cfe/trunk/lib/Sema/Sem

r265125 - [Lexer] Don't read out of bounds if a conflict marker is at the end of a file

2016-04-01 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Apr 1 04:58:45 2016 New Revision: 265125 URL: http://llvm.org/viewvc/llvm-project?rev=265125&view=rev Log: [Lexer] Don't read out of bounds if a conflict marker is at the end of a file This can happen as we look for '' while scanning tokens but then expect '\n' to t

r265126 - [Lexer] Let the compiler infer string lengths. No functionality change intended.

2016-04-01 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Fri Apr 1 05:04:07 2016 New Revision: 265126 URL: http://llvm.org/viewvc/llvm-project?rev=265126&view=rev Log: [Lexer] Let the compiler infer string lengths. No functionality change intended. Modified: cfe/trunk/lib/Lex/Lexer.cpp Modified: cfe/trunk/lib/Lex/Lexer.cpp URL:

r265127 - [OPENMP] Fixed documentation category for 'declare simd' attribute, NFC.

2016-04-01 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Apr 1 05:12:06 2016 New Revision: 265127 URL: http://llvm.org/viewvc/llvm-project?rev=265127&view=rev Log: [OPENMP] Fixed documentation category for 'declare simd' attribute, NFC. Modified: cfe/trunk/include/clang/Basic/AttrDocs.td Modified: cfe/trunk/include/clang

Re: [PATCH] D18542: [OPENMP] Parsing and Sema support for 'omp declare target' directive

2016-04-01 Thread Dmitry Polukhin via cfe-commits
DmitryPolukhin updated this revision to Diff 52349. DmitryPolukhin marked an inline comment as done. DmitryPolukhin added a comment. - implemented ad hoc solution for printing - added documentation for the attrbute - reabse In http://reviews.llvm.org/D18542#388241, @aaron.ballman wrote: > If you

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D18649#389294, @courbet wrote: > In http://reviews.llvm.org/D18649#388337, @Eugene.Zelenko wrote: > > > Please mention new check in docs/ReleaseNotes.rst. > > > That should be in a different commit, right ? Release notes are in a > different rep

Re: [PATCH] D10834: Added functions to retrieve information about whether a vardecl is local in libclang and its python bindings.

2016-04-01 Thread guibufolo+l...@gmail.com via cfe-commits
RedX2501 updated this revision to Diff 52358. RedX2501 added a comment. Fixed compiler warnings. http://reviews.llvm.org/D10834 Files: bindings/python/clang/cindex.py bindings/python/tests/cindex/test_cursor.py include/clang-c/Index.h test/Index/islocalvardecl.cpp tools/c-index-test/c

[PATCH] D18695: [clang-tidy] Reduce false-positive ratio in misc-suspicious-missing-comma check.

2016-04-01 Thread Etienne Bergeron via cfe-commits
etienneb created this revision. etienneb added a reviewer: alexfh. etienneb added a subscriber: cfe-commits. This patch is adding detection of common string literal patterns that should not trigger warnings. [*] Add a limit on the number of concatenated token, [*] Add support for parenthese s

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52353. courbet added a comment. Updated release notes. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppcoreguidelines/InterfacesGlobalInitChec

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet added a comment. In http://reviews.llvm.org/D18649#388337, @Eugene.Zelenko wrote: > Please mention new check in docs/ReleaseNotes.rst. That should be in a different commit, right ? Release notes are in a different repo (forgive my ignorance, this is my first patch). http://reviews.ll

Re: [PATCH] D18695: [clang-tidy] Reduce false-positive ratio in misc-suspicious-missing-comma check.

2016-04-01 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 52365. etienneb added a comment. Simplification and nits. http://reviews.llvm.org/D18695 Files: clang-tidy/misc/SuspiciousMissingCommaCheck.cpp clang-tidy/misc/SuspiciousMissingCommaCheck.h test/clang-tidy/misc-suspicious-missing-comma.cpp Index: te

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for working on the new clang-tidy check! We usually recommend authors to run their checks on a large code base to ensure it doesn't crash and doesn't generate obvious false positives. It would be nice, if you could provide a quick summary of such a run (total n

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-04-01 Thread Samuel Benzaquen via cfe-commits
sbenza added inline comments. Comment at: clang-tidy/misc/AssignOperatorCheck.cpp:63 @@ +62,3 @@ + + Finder->addMatcher(returnStmt(IsBadReturnStatement, hasAncestor(IsGoodAssign)) + .bind("returnStmt"), I dislike these uses of hasAnscesto

Re: [PATCH] D18265: [clang-tidy] New: checker misc-assign-operator-return

2016-04-01 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/misc-assign-operator.cpp:16 @@ +15,3 @@ + AlsoGood& operator=(AlsoGood); +}; + sbenza wrote: > This is a very common C++98 way of implementing copy-and-swap with copy > elision support. > You do: `

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Etienne Bergeron via cfe-commits
etienneb added a subscriber: etienneb. etienneb added a comment. some nits. Comment at: clang-tidy/cppcoreguidelines/InterfacesGlobalInitCheck.cpp:21 @@ +20,3 @@ +void InterfacesGlobalInitCheck::registerMatchers(MatchFinder *Finder) { + auto IsStaticGlobal = + allOf(hasGlo

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet removed a subscriber: etienneb. courbet updated this revision to Diff 52366. courbet marked 2 inline comments as done. courbet added a comment. Style fixes. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelin

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet added a subscriber: etienneb. courbet added a comment. Looks like there's a race condition in phabricator. Comment at: test/clang-tidy/cppcoreguidelines-interfaces-global-init.cpp:37 @@ +36,3 @@ +static int FromClassBadInit = takesInt(A::ClassScope); +// CHECK-MESSAGES:

Re: [PATCH] D10834: Added functions to retrieve information about whether a vardecl is local in libclang and its python bindings.

2016-04-01 Thread guibufolo+l...@gmail.com via cfe-commits
RedX2501 updated this revision to Diff 52367. RedX2501 added a comment. Fix compilation error introduced due to breaking a long string. Fixed indentation. http://reviews.llvm.org/D10834 Files: bindings/python/clang/cindex.py bindings/python/tests/cindex/test_cursor.py include/clang-c/Inde

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. more nits, sorry didn't saw them first time. Comment at: test/clang-tidy/cppcoreguidelines-interfaces-global-init.cpp:32 @@ +31,3 @@ +// CHECK-MESSAGES: [[@LINE-1]]:12: warning: initializing static variable with non-const expression depending on static

Re: [PATCH] D18695: [clang-tidy] Reduce false-positive ratio in misc-suspicious-missing-comma check.

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good! http://reviews.llvm.org/D18695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

Re: [PATCH] D18695: [clang-tidy] Reduce false-positive ratio in misc-suspicious-missing-comma check.

2016-04-01 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. thanks alex, I'll give a day or two to people to jump in. If no other comments, I'll land it. http://reviews.llvm.org/D18695 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Clement Courbet via cfe-commits
courbet updated this revision to Diff 52370. courbet marked 3 inline comments as done. courbet added a comment. Constness + typos. http://reviews.llvm.org/D18649 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cpp clang-tidy/cppc

Re: [PATCH] D18442: A clang-tidy check for std:accumulate.

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Sorry for the delay (mostly due to the holidays here). The check looks very useful, at least, the pattern is hard to spot by manual inspection. A few comments though, mostly style-related. Comment at: clang-tidy/misc/FoldInitTypeCheck.cpp:21 @@ +20,3 @@

Re: [PATCH] D18180: [clang-tidy] Add a check to detect static definitions in anonymous namespace.

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Sorry for the delay. A few minor issues. Comment at: clang-tidy/readability/StaticDefinitionInAnonymousNamespaceCheck.cpp:46 @@ +45,3 @@ + auto Diag = diag(Def->getLocation(), "'%0' is a static definition in " + "an

Re: [PATCH] D18694: [ClangTidy] Add an 'explain-checks' option to diagnose where each checks comes from.

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Nice! I like the idea, but we need to figure out a bunch of details (see the comments inline). Comment at: clang-tidy/ClangTidyOptions.cpp:264 @@ +263,3 @@ + ParsedOptions->CheckSources[*ParsedOptions->Checks] = + std::string(ConfigFile.c_s

Re: [PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL 1.2/2.0 header files.

2016-04-01 Thread Yaxun Liu via cfe-commits
yaxunl added a comment. Anastasia/Alexey/Xiuli, Do you agree that we should have one single opencl.h instead of headers for different OpenCL versions? Since most 1.2 builtins are included in 2.0. I think this is doable. If no objection, I will try to merge them into one header first then addre

Re: [PATCH] D18649: [clang-tidy] cppcoreguidelines-interfaces-global-init

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/cppcoreguidelines/InterfacesGlobalInitCheck.cpp:46 @@ +45,3 @@ + "initializing static variable with non-const expression depending on " + "static variable '%0'.") + << Referencee->getName(); nit

Re: [PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL 1.2/2.0 header files.

2016-04-01 Thread Yaxun Liu via cfe-commits
yaxunl added a comment. One of the difference between opencl-12.cl and opencl-20.cl is opencl-12.cl defines #define const_func __attribute__((const)) #define readonly __attribute__((pure)) and uses them for many functions, e.g. float const_func __attribute__((overloadable)) acos(float);

Re: [PATCH] D18110: [OpenMP] Fix SEMA bug in the capture of global variables in template functions.

2016-04-01 Thread Samuel Antao via cfe-commits
sfantao added a comment. Hi Alexey, Comment at: lib/Sema/SemaOpenMP.cpp:816-822 @@ -801,6 +815,9 @@ + + // A DSA refers to this captured region if the parent contexts match. + auto *ParentContext = RSI->TheCapturedDecl->getParent(); for (auto I = Stack.rbegin(), EE = Stack.

Re: [PATCH] D18136: boost-use-to-string check

2016-04-01 Thread Piotr Padlewski via cfe-commits
Prazek updated the summary for this revision. Prazek updated this revision to Diff 52378. Prazek added a comment. Updated ReleaseNotes and also fixed bug. After lgtm please lgtm also this http://reviews.llvm.org/D18274 because I want to send them together, but in separate commits. http://review

Re: [PATCH] D18136: boost-use-to-string check

2016-04-01 Thread Piotr Padlewski via cfe-commits
Prazek marked an inline comment as done. Prazek added a comment. http://reviews.llvm.org/D18136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r265146 - [OpenCL] Moved nosvm attribute handling in Sema to other OpenCL attrs

2016-04-01 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Fri Apr 1 11:05:09 2016 New Revision: 265146 URL: http://llvm.org/viewvc/llvm-project?rev=265146&view=rev Log: [OpenCL] Moved nosvm attribute handling in Sema to other OpenCL attrs Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp Modified: cfe/trunk/lib/Sema/SemaDeclAttr

Re: [PATCH] D18110: [OpenMP] Fix SEMA bug in the capture of global variables in template functions.

2016-04-01 Thread Carlo Bertolli via cfe-commits
carlo.bertolli added a comment. Hi If I understand correctly the problem, I would like to add something on top of Samuel's comment. My understanding is that Alexey is suggesting that we pass a reference type to kernels for every pointer input parameter, regardless of the actual type and data s

Re: [PATCH] D18196: [CodeGen] Emit lifetime.end intrinsic after destructor call in landing pad

2016-04-01 Thread John McCall via cfe-commits
rjmccall added a comment. LGTM. http://reviews.llvm.org/D18196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

2016-04-01 Thread Anastasia Stulova via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/invalid-block.cl:8-9 @@ -8,4 +7,4 @@ + int (^bl1)() = ^() {return 1;}; // expected-error{{invalid block variable declaration - must be const qualified}} int (^const bl2)(); // expected-error{{invalid block variable

[PATCH] D18698: [C11] PR24451: Allow restrict _Atomic pointers

2016-04-01 Thread Denis Zobnin via cfe-commits
d.zobnin.bugzilla created this revision. d.zobnin.bugzilla added a reviewer: rsmith. d.zobnin.bugzilla added a subscriber: cfe-commits. Treat _Atomic pointers as pointer types (check value type of AtomicType) in case of handling the "restrict" qualifier. Accept such code (so does GCC): int * res

Re: [PATCH] D18369: [OpenCL] Upstreaming khronos OpenCL 1.2/2.0 header files.

2016-04-01 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In http://reviews.llvm.org/D18369#389469, @yaxunl wrote: > One of the difference between opencl-12.cl and opencl-20.cl is opencl-12.cl > defines > > #define const_func __attribute__((const)) > #define readonly __attribute__((pure)) > > > and uses them for many f

[PATCH] D18700: [Inline asm][GCC compatibility] Handle %v-prefixed code in inline assembly

2016-04-01 Thread Denis Zobnin via cfe-commits
d.zobnin.bugzilla created this revision. d.zobnin.bugzilla added a reviewer: echristo. d.zobnin.bugzilla added a subscriber: cfe-commits. Handle an inline assembly feature of GCC: code prefixed with "%v", e. g. "%vpcmpestri" is transformed into "vpcmpestri" instruction if target supports AVX and

r265162 - [CrashReproducer] Add -fmodule-cache-path to reproducer script

2016-04-01 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Fri Apr 1 12:39:08 2016 New Revision: 265162 URL: http://llvm.org/viewvc/llvm-project?rev=265162&view=rev Log: [CrashReproducer] Add -fmodule-cache-path to reproducer script The cc1 invocation in the reproducer script should contain a valid path in -fmodule-cache-path; for th

Re: [PATCH] D18565: Implement an "I'm dtrace, please retain all debug types" option.

2016-04-01 Thread Adrian Prantl via cfe-commits
> On Mar 31, 2016, at 5:35 PM, David Blaikie wrote: > > > > On Wed, Mar 30, 2016 at 10:49 AM, Adrian Prantl > wrote: > >> On Mar 29, 2016, at 10:06 PM, David Blaikie > > wrote: >> >> >> >> On Tue, Mar 29, 2016 at 12:03 PM, Adrian Prantl

[PATCH] D18703: [clang-tidy] Add new checker for comparison with runtime string functions.

2016-04-01 Thread Etienne Bergeron via cfe-commits
etienneb created this revision. etienneb added a reviewer: alexfh. etienneb added a subscriber: cfe-commits. This checker is validating suspicious usage of string compare functions. Example: ``` if (strcmp(...)) // Implicitly compare to zero if (!strcmp(...)) // Won't warn if (st

Re: [PATCH] D18567: Block: Fix a crash when we have type attributes or qualifiers with omitted return type.

2016-04-01 Thread Manman Ren via cfe-commits
manmanren updated this revision to Diff 52398. manmanren added a comment. Addressing review comments. http://reviews.llvm.org/D18567 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaType.cpp test/SemaObjC/block-omitted-return-type.m test/SemaOpenCL/invalid-block.cl Index:

Re: [PATCH] D18698: [C11] PR24451: Allow restrict _Atomic pointers

2016-04-01 Thread Richard Smith via cfe-commits
rsmith added a comment. I'm not convinced this change is correct. There are two possibilities for what `int *_Atomic restrict` could mean: 1. `_Atomic(int *restrict)`: this seems to be ill-formed by 6.7.2.4/3, because the type name in an atomic type specifier cannot be a qualified type 2. `_Ato

Re: [PATCH] D18703: [clang-tidy] Add new checker for comparison with runtime string functions.

2016-04-01 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. Implicit conversions to bool should be handled by readability-implicit-bool-cast. http://reviews.llvm.org/D18703 ___ cfe-commits mailing list cfe-commits@lists.llvm.

Re: [PATCH] D18703: [clang-tidy] Add new checker for comparison with runtime string functions.

2016-04-01 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. As pointed by Eugene, The following code seems to produce multiple errors. int foo() { if (strcmp(A, "a") == true) return 0; return 1; } Results: /home/etienneb/examples/test.cc:56:7: warning: function 'strcmp' is compared to a suspicious constant

Re: [PATCH] D18703: [clang-tidy] Add new checker for comparison with runtime string functions.

2016-04-01 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/misc-suspicious-string-compare.rst:12 @@ +11,3 @@ +Example: + if (strcmp(...)) // Implicitly compare to zero + if (!strcmp(...)) // Won't warn I don't know documentation markup w

Re: [PATCH] D18703: [clang-tidy] Add new checker for comparison with runtime string functions.

2016-04-01 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment. In http://reviews.llvm.org/D18703#389706, @etienneb wrote: > As pointed by Eugene, > > The following code seems to produce multiple errors. > > int foo() { > if (strcmp(A, "a") == true) > return 0; > return 1; > } > > > Results: > > /home/etienn

Re: r265038 - Diagnostics: remove dodgy handler for bitcode inlineasm diagnostics.

2016-04-01 Thread Tim Northover via cfe-commits
> On 31 Mar 2016, at 16:51, Steven Wu wrote: > > The original handler is not there to workaround a crash. It is to avoid > generate a crash report (report_fatal_error) when the input bitcode contains > invalid assembly. Ah, I see now. That test needs tweaking too, since it doesn't actually p

r265177 - Diagnose missing macro argument following charize operator.

2016-04-01 Thread Andy Gibbs via cfe-commits
Author: andyg Date: Fri Apr 1 14:02:20 2016 New Revision: 265177 URL: http://llvm.org/viewvc/llvm-project?rev=265177&view=rev Log: Diagnose missing macro argument following charize operator. For completeness, add a test-case for the equivalent stringize operator diagnostic too. Modified: cf

Re: [PATCH] D18703: [clang-tidy] Add new checker for comparison with runtime string functions.

2016-04-01 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. You're right, both are outputted. /home/etienneb/examples/test.cc:56:7: warning: function 'strcmp' is called without explicitly comparing result [misc-suspicious-string-compare] if (strcmp(A, "a")) ^ != 0 /home/etienneb/examples/te

Re: r265038 - Diagnostics: remove dodgy handler for bitcode inlineasm diagnostics.

2016-04-01 Thread Steven Wu via cfe-commits
> On Apr 1, 2016, at 12:04 PM, Tim Northover wrote: > > >> On 31 Mar 2016, at 16:51, Steven Wu wrote: >> >> The original handler is not there to workaround a crash. It is to avoid >> generate a crash report (report_fatal_error) when the input bitcode contains >> invalid assembly. > > Ah,

[PATCH] D18709: Add copyright notice to modulemap files

2016-04-01 Thread Yunzhong Gao via cfe-commits
ygao created this revision. ygao added subscribers: cfe-commits, rsmith. Hi, It seems that the module.modulemap file in the lib/Headers directory is missing the LLVM copyright notice. This patch adds the copyright notice just like the rest of the files in this directory. Could you review that is

Re: [PATCH] D17963: [OPENMP] Codegen for teams directive for NVPTX

2016-04-01 Thread Carlo Bertolli via cfe-commits
carlo.bertolli updated this revision to Diff 52416. carlo.bertolli added a comment. [OPENMP] Even though this patch was already accepted in its previous form, comments on depending patch http://reviews.llvm.org/D18286 (http://reviews.llvm.org/D18286) revealed that a new approach for this patch

Re: [PATCH] D18703: [clang-tidy] Add new checker for comparison with runtime string functions.

2016-04-01 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 52420. etienneb added a comment. Fix support for C. Adding test for C99 code. http://reviews.llvm.org/D18703 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SuspiciousStringCompareCheck.cpp clang-tidy/misc/S

Re: [PATCH] D18703: [clang-tidy] Add new checker for comparison with runtime string functions.

2016-04-01 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 52421. etienneb marked an inline comment as done. etienneb added a comment. nits and formatting http://reviews.llvm.org/D18703 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SuspiciousStringCompareCheck.cpp

Re: [PATCH] D18703: [clang-tidy] Add new checker for comparison with runtime string functions.

2016-04-01 Thread Etienne Bergeron via cfe-commits
etienneb added a comment. Eugene, I double checked and the implicit bool version doesn't trigger in C. This check is applied in C and C++. (note: I needed to add code to fix C) Comment at: docs/clang-tidy/checks/misc-suspicious-string-compare.rst:13 @@ +12,3 @@ +.. code:: c++ +

Re: [PATCH] D17412: PR19957: [OpenCL] incorrectly accepts implicit address space conversion with ternary operator

2016-04-01 Thread Yaxun Liu via cfe-commits
yaxunl marked 2 inline comments as done. Comment at: test/CodeGenOpenCL/address-spaces-conversions.cl:1 @@ -1,2 +1,2 @@ // RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -O0 -ffake-address-space-map -cl-std=CL2.0 -emit-llvm -o - | FileCheck %s Anastasia w

Re: [PATCH] D18565: Implement an "I'm dtrace, please retain all debug types" option.

2016-04-01 Thread David Blaikie via cfe-commits
On Fri, Apr 1, 2016 at 10:54 AM, Adrian Prantl wrote: > > On Mar 31, 2016, at 5:35 PM, David Blaikie wrote: > > > > On Wed, Mar 30, 2016 at 10:49 AM, Adrian Prantl wrote: > >> >> On Mar 29, 2016, at 10:06 PM, David Blaikie wrote: >> >> >> >> On Tue, Mar 29, 2016 at 12:03 PM, Adrian Prantl via

Re: [PATCH] D18637: Extract key to avoid preemptive mallocs in insert/emplace in associative containers

2016-04-01 Thread Duncan P. N. Exon Smith via cfe-commits
LGTM. Thanks for picking this up (and sorry for getting distracted)! > On 2016-Mar-30, at 21:15, Eric Fiselier wrote: > > EricWF created this revision. > EricWF added reviewers: mclow.lists, dexonsmith. > EricWF added a subscriber: cfe-commits. > > This patch applies Duncan's work on __hash_ta

Re: [PATCH] D18637: Extract key to avoid preemptive mallocs in insert/emplace in associative containers

2016-04-01 Thread Duncan P. N. Exon Smith via cfe-commits
dexonsmith added a subscriber: dexonsmith. dexonsmith added a comment. LGTM. Thanks for picking this up (and sorry for getting distracted)! http://reviews.llvm.org/D18637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-01 Thread John McCall via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:1421 @@ -1415,1 +1420,3 @@ +else + return Builder.CreateBitCast(Src, DstTy); } This is just CreatePointerBitCastOrAddrSpaceCast. http://reviews.llvm.org/D18713 __

Re: [PATCH] D17933: Set MaxAtomicInlineWidth properly for i386, i486, and x86-64 cpus without cmpxchg16b.

2016-04-01 Thread James Y Knight via cfe-commits
jyknight marked an inline comment as done. Comment at: test/CodeGen/atomic-ops.c:1 @@ -1,2 +1,2 @@ -// RUN: %clang_cc1 %s -emit-llvm -o - -ffreestanding -ffake-address-space-map -triple=i686-apple-darwin9 | FileCheck %s +// RUN: %clang_cc1 %s -emit-llvm -o - -ffreestanding -ffake

Re: [PATCH] D17933: Set MaxAtomicInlineWidth properly for i386, i486, and x86-64 cpus without cmpxchg16b.

2016-04-01 Thread James Y Knight via cfe-commits
jyknight updated this revision to Diff 52430. jyknight added a comment. Review tweaks. http://reviews.llvm.org/D17933 Files: lib/Basic/Targets.cpp lib/Frontend/InitPreprocessor.cpp test/CodeGen/atomic-ops.c test/CodeGen/ms-volatile.c test/CodeGenCXX/atomicinit.cpp test/OpenMP/atomic

Re: [RFC] [PATCH] Announcing new Clang Diagnostic Personalities

2016-04-01 Thread Richard Smith via cfe-commits
Wonderful work, I look forward to it landing in SVN. Only one concern: the choice to select the personality during compilation seems to create problems: * We won't have an easy way to check that changes that add / change diagnostics correctly update all the personalities * Distributions would p

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-01 Thread Yaxun Liu via cfe-commits
yaxunl updated the summary for this revision. yaxunl updated this revision to Diff 52431. yaxunl added a comment. Use CreatePointerBitCastOrAddrSpaceCast as John suggested. http://reviews.llvm.org/D18713 Files: lib/CodeGen/CGExprScalar.cpp test/CodeGenOpenCL/2016-04-01-addrcast.cl Index: t

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-01 Thread John McCall via cfe-commits
rjmccall added a comment. LGTM, thanks! http://reviews.llvm.org/D18713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17392: Embed bitcode in object file (clang cc1 part)

2016-04-01 Thread Steven Wu via cfe-commits
steven_wu updated this revision to Diff 52435. steven_wu added a comment. Address the feedback from Richard: Break -fembed-bitcode option into multiple -fembed-bitcode= options. -fembed-bitcode=all will embed both bitcode and commandline and -fembed-bitcode=bitcode will embed only the bitcode in

r265195 - [modules] Start moving the code for encoding AST records out of ASTWriter into

2016-04-01 Thread Richard Smith via cfe-commits
Author: rsmith Date: Fri Apr 1 17:52:03 2016 New Revision: 265195 URL: http://llvm.org/viewvc/llvm-project?rev=265195&view=rev Log: [modules] Start moving the code for encoding AST records out of ASTWriter into a separate class. The goal is for this class to have a separate lifetime from the AST

r265197 - [CodeGen] Emit lifetime.end intrinsic after objects are destructed in

2016-04-01 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Fri Apr 1 17:58:55 2016 New Revision: 265197 URL: http://llvm.org/viewvc/llvm-project?rev=265197&view=rev Log: [CodeGen] Emit lifetime.end intrinsic after objects are destructed in landing pads. Previously, lifetime.end intrinsics were inserted only on normal control flows

Re: [PATCH] D18196: [CodeGen] Emit lifetime.end intrinsic after destructor call in landing pad

2016-04-01 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL265197: [CodeGen] Emit lifetime.end intrinsic after objects are destructed in (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D18196?vs=52110&id=52440#toc Repository: rL LLVM

[PATCH] D18708: Set C99 as default C Standard for PS4 target

2016-04-01 Thread Yung, Douglas via cfe-commits
Forwarding to cfe-commits as I don't think I saw it appear there. > dyung created this revision. > > On the PS4, the default C standard is C99 which differs from the > current default of C11. This patch makes the default C99 when targeting > the PS4. > > http://reviews.llvm.org/D18708 > > Files

[PATCH] D18717: [Clang-tidy] Improve checks documentation consistency

2016-04-01 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: alexfh, aaron.ballman, LegalizeAdulthood. Eugene.Zelenko added a subscriber: cfe-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. I tried to make using of `` and ` more consistent. Two Google checks chang

r265201 - [Objective-C] Introduce objc_runtime_visible attribute.

2016-04-01 Thread Douglas Gregor via cfe-commits
Author: dgregor Date: Fri Apr 1 18:23:52 2016 New Revision: 265201 URL: http://llvm.org/viewvc/llvm-project?rev=265201&view=rev Log: [Objective-C] Introduce objc_runtime_visible attribute. The objc_runtime_visible attribute deals with an odd corner case where a particular Objective-C class is kn

Re: [PATCH] D18073: Add memory allocating functions

2016-04-01 Thread Alexander Riccio via cfe-commits
ariccio added a comment. I'm sorry, I'm confused. As an example, for `_wcsdup_dbg`, I've added `testWinWcsdupDbg`, `testWinWcsdupDbgContentIsDefined`, and `testWinWideDbgLeakWithinReturn`. Which ones should I drop for that API? http://reviews.llvm.org/D18073 ___

Re: r263191 - Preserve ExtParameterInfos into CGFunctionInfo.

2016-04-01 Thread John McCall via cfe-commits
> On Apr 1, 2016, at 3:50 PM, Nico Weber wrote: > On Thu, Mar 10, 2016 at 8:30 PM, John McCall via cfe-commits > mailto:cfe-commits@lists.llvm.org>> wrote: > Author: rjmccall > Date: Thu Mar 10 22:30:31 2016 > New Revision: 263191 > > URL: http://llvm.org/viewvc/llvm-project?rev=263191&view=rev

Re: [PATCH] D18708: Set C99 as default C Standard for PS4 target

2016-04-01 Thread Yunzhong Gao via cfe-commits
ygao added a subscriber: ygao. Comment at: test/Driver/ps4-misc-defaults.cpp:10 @@ +9,2 @@ +// RUN: %clang -target x86_64-scei-ps4 -E -x c -dM %s | FileCheck -check-prefix=CHECK-CSTD %s +// CHECK-CSTD: __STDC_VERSION__ 199901L It seems to me that this part of the

Re: [PATCH] D18708: Set C99 as default C Standard for PS4 target

2016-04-01 Thread Richard Smith via cfe-commits
rsmith added a subscriber: rsmith. rsmith added a comment. What's the motivation for this change? Clang's C11 mode should accept all code accepted by its C99 mode (and conversely, most or perhaps all of the C11 language features are accepted by default in C99 mode as an extension). Is the probl

Re: [PATCH] D17987: [clang-tidy] Extension of checker misc-misplaced-widening-cast

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good! Thank you for addressing the comments. Comment at: clang-tidy/misc/MisplacedWideningCastCheck.cpp:117 @@ +116,3 @@ +static llvm::SmallDenseMap createRelativeCharSi

Re: [PATCH] D18717: [Clang-tidy] Improve checks documentation consistency

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Awesome! Thanks! Repository: rL LLVM http://reviews.llvm.org/D18717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

Re: [PATCH] D18708: Set C99 as default C Standard for PS4 target

2016-04-01 Thread Douglas Yung via cfe-commits
dyung added a comment. In http://reviews.llvm.org/D18708#390132, @rsmith wrote: > What's the motivation for this change? Clang's C11 mode should accept all > code accepted by its C99 mode (and conversely, most or perhaps all of the C11 > language features are accepted by default in C99 mode as

Re: [PATCH] D18717: [Clang-tidy] Improve checks documentation consistency

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Also, could you, please, next time generate diffs with full context as documented in http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface (or use arcanist, which does this automatically)? This sometimes (not in this case) saves reviewers manua

Re: [PATCH] D18717: [Clang-tidy] Improve checks documentation consistency

2016-04-01 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment. In http://reviews.llvm.org/D18717#390151, @alexfh wrote: > Also, could you, please, next time generate diffs with full context as > documented in > http://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface > (or use arcanist, which does thi

[clang-tools-extra] r265205 - [Clang-tidy] Improve checks documentation consistency.

2016-04-01 Thread Eugene Zelenko via cfe-commits
Author: eugenezelenko Date: Fri Apr 1 20:07:18 2016 New Revision: 265205 URL: http://llvm.org/viewvc/llvm-project?rev=265205&view=rev Log: [Clang-tidy] Improve checks documentation consistency. Differential revision: http://reviews.llvm.org/D18717 Modified: clang-tools-extra/trunk/docs/clan

Re: [PATCH] D18717: [Clang-tidy] Improve checks documentation consistency

2016-04-01 Thread Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL265205: [Clang-tidy] Improve checks documentation consistency. (authored by eugenezelenko). Changed prior to commit: http://reviews.llvm.org/D18717?vs=52441&id=52451#toc Repository: rL LLVM http://r

Re: [PATCH] D18708: Set C99 as default C Standard for PS4 target

2016-04-01 Thread Richard Smith via cfe-commits
rsmith accepted this revision. rsmith added a reviewer: rsmith. rsmith added a comment. This revision is now accepted and ready to land. In http://reviews.llvm.org/D18708#390150, @dyung wrote: > From my understanding, there are 2 issues that block us. The first is that we > currently do not ship

Re: [PATCH] D15332: new clang-tidy checker readability-non-const-parameter

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/readability/NonConstParameterCheck.cpp:44 @@ +43,3 @@ +addParm(Parm); + } else if (const CXXConstructorDecl *Ctor = + Result.Nodes.getNodeAs("Ctor")) { `const auto *Ctor` C

Re: [PATCH] D18708: Set C99 as default C Standard for PS4 target

2016-04-01 Thread Douglas Yung via cfe-commits
dyung added a comment. In http://reviews.llvm.org/D18708#390166, @rsmith wrote: > In http://reviews.llvm.org/D18708#390150, @dyung wrote: > > > From my understanding, there are 2 issues that block us. The first is that > > we currently do not ship all of the header files for C11. The second is

Re: [PATCH] D17043: Check that the result of a library call w/o side effects is used

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. What's the status of this patch? Do you still want to continue working on it or are you fine with the warn_unused_result/nodiscard-based solution? http://reviews.llvm.org/D17043

Re: [PATCH] D15332: new clang-tidy checker readability-non-const-parameter

2016-04-01 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment. Please also mention check in docs/ReleaseNotes.rst. Comment at: docs/clang-tidy/checks/readability-non-const-parameter.rst:15 @@ +14,3 @@ + + // warning here; the declaration "const char *p" would make the function + // interface safer. ---

Re: [PATCH] D18136: boost-use-to-string check

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-tidy/boost/UseToStringCheck.cpp:55 @@ +54,3 @@ +void UseToStringCheck::check(const MatchFinder::MatchResult &Result) { + const auto *MatchedToString = Result.Nodes.getNodeA

Re: [PATCH] D18191: [clang-tidy] Add check for function parameters that are const& to builtin types

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Adding Samuel, who's written a similar check internally and might want to upstream it or suggest improvements to this patch. http://reviews.llvm.org/D18191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists

Re: [PATCH] D15032: [clang-tidy] new checker cppcoreguidelines-pro-lifetime

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. FYI, I'm waiting with reviewing this change until http://reviews.llvm.org/D15031 is landed, since it can affect this patch. http://reviews.llvm.org/D15032 ___

Re: [PATCH] D16248: [Clang-tidy] rename misc-inefficient-algorithm to performance-inefficient-algorithm

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Please rebase the patch and add full context to the diffs (see http://llvm.org/docs/Phabricator.html). Comment at: docs/clang-tidy/checks/misc-inefficient-algorithm.rst:4 @@ -5,1 +3,3 @@ +.. meta:: + :http-equiv=refresh: 5;URL=performance-inefficient-a

Re: [PATCH] D18575: [clang-tidy] New checker to replace deprecated throw() specifications

2016-04-01 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-tidy/modernize/UseNoexceptCheck.cpp:16 @@ +15,3 @@ + +// FIXME: Should this be moved to ASTMatchers.h? +namespace ast_matchers { Yes, it might make sense to

  1   2   >