r307759 - CFG: Add CFGElement for automatic variables that leave the scope

2017-07-12 Thread Matthias Gehre via cfe-commits
Author: mgehre Date: Wed Jul 12 00:04:19 2017 New Revision: 307759 URL: http://llvm.org/viewvc/llvm-project?rev=307759&view=rev Log: CFG: Add CFGElement for automatic variables that leave the scope Summary: This mimics the implementation for the implicit destructors. The generation of this scope

[PATCH] D15031: CFG: Add CFGElement for automatic variables that leave the scope

2017-07-12 Thread Matthias Gehre via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307759: CFG: Add CFGElement for automatic variables that leave the scope (authored by mgehre). Changed prior to commit: https://reviews.llvm.org/D15031?vs=91378&id=106146#toc Repository: rL LLVM htt

[PATCH] D34301: [Sema] Make sure the definition of a referenced virtual function is emitted when it is final

2017-07-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak marked 2 inline comments as done. ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:14715 +if (Method->isVirtual() && !(Method->hasAttr() || + Method->getParent()->hasAttr())) OdrUse = false; vsk

[PATCH] D34301: [Sema] Make sure the definition of a referenced virtual function is emitted when it is final

2017-07-12 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 106149. ahatanak marked an inline comment as done. ahatanak added a comment. Address review comments. https://reviews.llvm.org/D34301 Files: include/clang/AST/DeclCXX.h include/clang/Sema/Sema.h lib/AST/DeclCXX.cpp lib/CodeGen/CGClass.cpp lib/Cod

[PATCH] D35257: [clang-tidy] Add new modernize use unary assert check

2017-07-12 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk updated this revision to Diff 106148. barancsuk marked 2 inline comments as done. barancsuk added a comment. - Further reviews addressed https://reviews.llvm.org/D35257 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/U

[PATCH] D35257: [clang-tidy] Add new modernize use unary assert check

2017-07-12 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk added inline comments. Comment at: clang-tidy/modernize/UnaryStaticAssertCheck.cpp:32 + + if (!AssertMessage || AssertMessage->getLength()) +return; aaron.ballman wrote: > I think this should be `!AssertMessage->getLength()` It works correctly with

r307760 - Expose some type-conversion functions as part of the IRGen ABI.

2017-07-12 Thread John McCall via cfe-commits
Author: rjmccall Date: Wed Jul 12 00:44:17 2017 New Revision: 307760 URL: http://llvm.org/viewvc/llvm-project?rev=307760&view=rev Log: Expose some type-conversion functions as part of the IRGen ABI. Patch by Benoit Vey! Modified: cfe/trunk/include/clang/CodeGen/CodeGenABITypes.h cfe/trun

[PATCH] D35180: Expose the Clang::QualType to llvm::Type conversion functions

2017-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall closed this revision. rjmccall added a comment. Committed. https://reviews.llvm.org/D35180 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-07-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I think you might also need to convert `APSInt`s to an appropriate type, as done above. Type of right-hand-side `APSInt`s do not necessarily coincide with the type of the left-hand-side symbol or of the whole expression. `APSInt` operations crash when signedness doesn't mat

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

2017-07-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:496 + if (const SymSymExpr *SSE = dyn_cast(Sym)) { +if (SSE->getOpcode() == BO_Sub) { With this, it sounds as if we're half-way into finally supporting the unary min

[PATCH] D34367: CodeGen: Fix address space of indirect function argument

2017-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCall.cpp:3832 + "indirect-arg-temp"); +IRCallArgs[FirstIRArg] = CastToAllocaAddrSpace(Addr.getPointer()); Isn't the original code here correct? You're basical

[PATCH] D35175: New option that adds the DiagID enum name and index to Diagnostic output.

2017-07-12 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. To me, features that only serve to help compiler development need to meet a higher bar than this. This just seems really marginal. Like Alex said, you should be able to pretty easily write a debugger script that breaks when it sees a specific diagnostic, or a diagnost

[PATCH] D35295: [docs] Add section 'Half-Precision Floating Point'

2017-07-12 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer created this revision. This documents the differences and interactions between _Float16 and __fp16. https://reviews.llvm.org/D35295 Files: docs/LanguageExtensions.rst Index: docs/LanguageExtensions.rst === --- docs

[PATCH] D33719: Add _Float16 as a C/C++ source language type

2017-07-12 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. I've created revision https://reviews.llvm.org/D35295 for the documentation update. https://reviews.llvm.org/D33719 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

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

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

[PATCH] D35200: Don't use mmap on Windows

2017-07-12 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. What do you think about that change? https://reviews.llvm.org/D35200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir created this revision. Herald added a subscriber: klimek. This patch fixes bug https://bugs.llvm.org/show_bug.cgi?id=3313: a comment line was aligned with the next #ifdef even in the presence of an empty line between them. https://reviews.llvm.org/D35296 Files: lib/Format/TokenAnnota

[PATCH] D35295: [docs] Add section 'Half-Precision Floating Point'

2017-07-12 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added inline comments. Comment at: docs/LanguageExtensions.rst:448 +``__fp16`` is a storage and interchange format only. This means that values of +``__fp16`` promote to (at least) float when used in artimethic operations. There are +two ``__fp16`` formats. Clang su

[PATCH] D35297: [Sema] Fix operator lookup to consider local extern declarations.

2017-07-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. Previously Clang was not considering operator declarations that occur at function scope. This is incorrect according to [over.match.oper]p3 > The set of non-member candidates is the result of the unqualified lookup of > operator@ in the context of the expression ac

[PATCH] D34404: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. I tried landing the patch for you, but it doesn't apply cleanly. One reason is that it contains changes to both cfe and clang-tools-extra repos. But even when I apply the patch to the two directories it breaks a bunch of clang-apply-replacements tests: Failing Tests (

[PATCH] D35297: [Sema] Fix operator lookup to consider local extern declarations.

2017-07-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 106166. EricWF added a comment. Add more appropriate test. https://reviews.llvm.org/D35297 Files: lib/Sema/SemaLookup.cpp test/SemaCXX/overloaded-operator.cpp Index: test/SemaCXX/overloaded-operator.cpp =

[PATCH] D35297: [Sema] Fix operator lookup to consider local extern declarations.

2017-07-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF updated this revision to Diff 106168. EricWF edited the summary of this revision. https://reviews.llvm.org/D35297 Files: lib/Sema/SemaLookup.cpp test/SemaCXX/overloaded-operator.cpp Index: test/SemaCXX/overloaded-operator.cpp ==

[PATCH] D35295: [docs] Add section 'Half-Precision Floating Point'

2017-07-12 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer updated this revision to Diff 106167. SjoerdMeijer added a comment. Thanks for review! Feedback addressed. https://reviews.llvm.org/D35295 Files: docs/LanguageExtensions.rst Index: docs/LanguageExtensions.rst === -

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Daniel Jasper via Phabricator via cfe-commits
djasper added a comment. I still think we should make this dependent on the current indentation. Why do you think this is better? https://reviews.llvm.org/D35296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D35295: [docs] Add section 'Half-Precision Floating Point'

2017-07-12 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added inline comments. Comment at: docs/LanguageExtensions.rst:457 +that arithmetic on ``_Float16`` is performed in half-precision, thus it is not +a storage-only format. It is recommended that portable code use the +``_Float16`` type. I think the us

[PATCH] D35187: [libclang] Support for querying whether an enum is scoped

2017-07-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Sure, I'll commit it today. https://reviews.llvm.org/D35187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-07-12 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan updated this revision to Diff 106170. yvvan added a comment. Add more checks into GetDefaultValueString to make it safe https://reviews.llvm.org/D33644 Files: lib/Sema/SemaCodeComplete.cpp test/CodeCompletion/functions.cpp test/Index/code-completion.cpp test/Index/complete-optiona

r307769 - [libclang] Support for querying whether an enum is scoped

2017-07-12 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jul 12 04:31:37 2017 New Revision: 307769 URL: http://llvm.org/viewvc/llvm-project?rev=307769&view=rev Log: [libclang] Support for querying whether an enum is scoped This commit allows checking whether an enum declaration is scoped through libclang and clang.cindex (Pyt

[PATCH] D35187: [libclang] Support for querying whether an enum is scoped

2017-07-12 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307769: [libclang] Support for querying whether an enum is scoped (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D35187?vs=106066&id=106173#toc Repository: rL LLVM https:/

r307770 - Revert r307769 (Forgot to mention the name of the contributor).

2017-07-12 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jul 12 04:34:14 2017 New Revision: 307770 URL: http://llvm.org/viewvc/llvm-project?rev=307770&view=rev Log: Revert r307769 (Forgot to mention the name of the contributor). Modified: cfe/trunk/bindings/python/clang/cindex.py cfe/trunk/bindings/python/tests/cindex

r307771 - [libclang] Support for querying whether an enum is scoped

2017-07-12 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jul 12 04:35:11 2017 New Revision: 307771 URL: http://llvm.org/viewvc/llvm-project?rev=307771&view=rev Log: [libclang] Support for querying whether an enum is scoped This commit allows checking whether an enum declaration is scoped through libclang and clang.cindex (Pyt

[PATCH] D32700: [clang-tidy] Add bugprone-suspicious-memset-usage check.

2017-07-12 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs updated this revision to Diff 106172. rnkovacs retitled this revision from "[clang-tidy] Add misc-suspicious-memset-usage check." to "[clang-tidy] Add bugprone-suspicious-memset-usage check.". rnkovacs edited the summary of this revision. rnkovacs added a comment. - Created new module `

[PATCH] D35187: [libclang] Support for querying whether an enum is scoped

2017-07-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Committed r307771 with correct attribution. Repository: rL LLVM https://reviews.llvm.org/D35187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32700: [clang-tidy] Add bugprone-suspicious-memset-usage check.

2017-07-12 Thread Whisperity via Phabricator via cfe-commits
whisperity requested changes to this revision. whisperity added a comment. This revision now requires changes to proceed. Considering the results published in the opening description: /home/reka/codechecker_dev_env/llvm/lib/Support/NativeFormatting.cpp:55:29:

[PATCH] D33645: [analyzer] Add missing documentation for static analyzer checkers

2017-07-12 Thread Dominik Szabó via Phabricator via cfe-commits
szdominik added a comment. In https://reviews.llvm.org/D33645#805920, @dcoughlin wrote: > Who is the target of this documentation? Is it developers of the analyzer or > is it end users of the analyzer? If it is end users, it is unfortunate that > we've been just grabbing examples from the regre

[PATCH] D33645: [analyzer] Add missing documentation for static analyzer checkers

2017-07-12 Thread Dominik Szabó via Phabricator via cfe-commits
szdominik updated this revision to Diff 106184. szdominik marked 9 inline comments as done. szdominik added a comment. Update with more idiomatic examples (from @dcoughlin). https://reviews.llvm.org/D33645 Files: www/analyzer/alpha_checks.html www/analyzer/available_checks.html www/analyz

[PATCH] D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check.

2017-07-12 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs updated this revision to Diff 106185. rnkovacs retitled this revision from "[clang-tidy] Add misc-undefined-memory-manipulation check." to "[clang-tidy] Add bugprone-undefined-memory-manipulation check.". rnkovacs edited the summary of this revision. rnkovacs added a comment. - Moved to

[PATCH] D35257: [clang-tidy] Add new modernize use unary assert check

2017-07-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UnaryStaticAssertCheck.cpp:32 + + if (!AssertMessage || AssertMessage->getLength()) +return; barancsuk wrote: > aaron.ballman wrote: > > I think this should be `!AssertMessage->getLength()

[PATCH] D35295: [docs] Add section 'Half-Precision Floating Point'

2017-07-12 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. Good points. I am thinking about how to write this down. I am not yet sure that `_Float16` can reduce portability. I think the behaviour will depend on FLT_EVAL_METHOD. I.e., if your architecture supports half-precision instructions, you would like to set FLT_EVAL_M

[clang-tools-extra] r307787 - [clang-tidy] add_new_check.py updates ReleaseNotes.rst now

2017-07-12 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Wed Jul 12 06:13:41 2017 New Revision: 307787 URL: http://llvm.org/viewvc/llvm-project?rev=307787&view=rev Log: [clang-tidy] add_new_check.py updates ReleaseNotes.rst now Modified: clang-tools-extra/trunk/clang-tidy/add_new_check.py Modified: clang-tools-extra/trunk/clan

[PATCH] D35175: New option that adds the DiagID enum name and index to Diagnostic output.

2017-07-12 Thread don hinton via Phabricator via cfe-commits
hintonda abandoned this revision. hintonda added a comment. Okay, sounds good. Look forward to seeing Alex's script... https://reviews.llvm.org/D35175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D31805: [clang-tidy] Mention "add the check to release note" in add_new_check.py.

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D31805#721433, @Eugene.Zelenko wrote: > I don't know how hard it'll be to implement, but will be great to add > > - New ` .html>`_ check > > Please add short description here. Good idea. I

[PATCH] D31700: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. You might want to commit this at some point ;] https://reviews.llvm.org/D31700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30170: Function definition may have uninstantiated body

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

[PATCH] D35225: [clang-tidy] add regression test to performance-unnecessary-value-param

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thanks! https://reviews.llvm.org/D35225 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D35257: [clang-tidy] Add new modernize use unary assert check

2017-07-12 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk updated this revision to Diff 106195. barancsuk marked 4 inline comments as done. barancsuk added a comment. - No longer warn when the message is from a macro expansion https://reviews.llvm.org/D35257 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyMod

[PATCH] D34913: [clang-tidy] Add a new Android check "android-cloexec-socket"

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG https://reviews.llvm.org/D34913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35190: __builtin_constant_p should consider the parameter of a constexpr function as constant

2017-07-12 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. What if the constexpr function is called with in a non-constexpr context, e.g. with a random global variable as argument? https://reviews.llvm.org/D35190 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.ll

[PATCH] D35257: [clang-tidy] Add new modernize use unary assert check

2017-07-12 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk added inline comments. Comment at: test/clang-tidy/modernize-unary-static-assert.cpp:16 + // CHECK-FIXES: {{^}} FOO{{$}} + static_assert(sizeof(a) <= 17, MSG); + // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use unary 'static_assert' when aaron.ballma

[PATCH] D35257: [clang-tidy] Add new modernize use unary assert check

2017-07-12 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! https://reviews.llvm.org/D35257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D35230: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG. Thank you for the fix! https://reviews.llvm.org/D35230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D35175: New option that adds the DiagID enum name and index to Diagnostic output.

2017-07-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. My script relies on a hack to map the name of the diagnostic to the enum value. We need to come up with a better to map the diagnostic name to the enum value. I propose a new utility tool that would take the name of the diagnostic and map it back to the enum value.

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-07-12 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D35109#806156, @NoQ wrote: > I think you might also need to convert `APSInt`s to an appropriate type, as > done above. Type of right-hand-side `APSInt`s do not necessarily coincide > with the type of the left-hand-side symbol or of

[PATCH] D35257: [clang-tidy] Add new modernize use unary assert check

2017-07-12 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307791: [clang-tidy] Add new modernize use unary assert check (authored by xazax). Changed prior to commit: https://reviews.llvm.org/D35257?vs=106195&id=106197#toc Repository: rL LLVM https://review

[clang-tools-extra] r307791 - [clang-tidy] Add new modernize use unary assert check

2017-07-12 Thread Gabor Horvath via cfe-commits
Author: xazax Date: Wed Jul 12 06:43:35 2017 New Revision: 307791 URL: http://llvm.org/viewvc/llvm-project?rev=307791&view=rev Log: [clang-tidy] Add new modernize use unary assert check Patch by: Lilla Barancsuk Differential Revision: https://reviews.llvm.org/D35257 Added: clang-tools-extra

[PATCH] D35175: New option that adds the DiagID enum name and index to Diagnostic output.

2017-07-12 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. Not sure how to do this all in a script, but perhaps we could enhance diagtool to generate this mapping for you. It currently only lists warnings, but I don't think it would be difficult to extend it and generate a mapping you could use in your script. https://revi

[PATCH] D35175: New option that adds the DiagID enum name and index to Diagnostic output.

2017-07-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Right. I was aware of the `diagtool` before, but didn't really look into what it did. TIL! It would make sense to add this kind of mapping functionality to that tool then. https://reviews.llvm.org/D35175 ___ cfe-commits m

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 106202. krasimir added a comment. - Switch to original column-based detection https://reviews.llvm.org/D35296 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestComments.cpp Index: unittests/Format/FormatTestComments.cpp =

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-07-12 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In https://reviews.llvm.org/D34512#803724, @klimek wrote: > Specifically, ping Richard for new top-level lib in clang. Richard proposed pulling this out into a separate library in the first place. Do we need his approval for the name? Or we want him to consider if th

[PATCH] D34512: Add preliminary Cross Translation Unit support library

2017-07-12 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Yep, I want Richard's approval for the name. I think he already expressed a pro-pulling-out stance. https://reviews.llvm.org/D34512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D34949: [refactor][rename] Use a single base class for class that finds a declaration at location and for class that searches for all occurrences of a specific declaration

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

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 106205. krasimir added a comment. - Update switch tests https://reviews.llvm.org/D35296 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp unittests/Format/FormatTestComments.cpp Index: unittests/Format/FormatTestComments.cpp =

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

2017-07-12 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a reviewer: rsmith. klimek added a comment. +Richard, as apparently we get the source ranges for default values of built-in types without the preceding "=", but for user-defined types including the preceding "=" - is that intentional? Comment at: lib/Sema/SemaCod

[PATCH] D31805: [clang-tidy] Mention "add the check to release note" in add_new_check.py.

2017-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein abandoned this revision. hokein added a comment. > Good idea. Implemented in r307787. No alphabetic order though. Feel free to > fix ;) Looks good. Thanks! Closing this revision. Repository: rL LLVM https://reviews.llvm.org/D31805 ___ c

[PATCH] D34949: [refactor][rename] Use a single base class for class that finds a declaration at location and for class that searches for all occurrences of a specific declaration

2017-07-12 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 Repository: rL LLVM https://reviews.llvm.org/D34949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/m

[PATCH] D35190: __builtin_constant_p should consider the parameter of a constexpr function as constant

2017-07-12 Thread Olivier Goffart via Phabricator via cfe-commits
ogoffart added a comment. > What if the constexpr function is called with in a non-constexpr context, > e.g. with a random global variable as argument? __builtin_constant_p will still return false in this case, contrary to gcc (whose behavior actually depends on the optimization level). I th

[PATCH] D35175: New option that adds the DiagID enum name and index to Diagnostic output.

2017-07-12 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. I'd be happy to do that if it would help. If so, should I do it here create a new diff? Perhaps we might even make sense add the ability to pass in a message and find the matching name/index. https://reviews.llvm.org/D35175 ___

[PATCH] D35175: New option that adds the DiagID enum name and index to Diagnostic output.

2017-07-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. I was impatient, so I already started on a patch for diagtool. I'll post it soon. https://reviews.llvm.org/D35175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-12 Thread wangxin via Phabricator via cfe-commits
wangxindsb updated this revision to Diff 106204. wangxindsb added a comment. - Change IsVirtualCall(const CallExpr *CE) to be a free static function. - Rename some variables. - Improve the BugReporterVisitor, enclose the declaration names in single quotes. - Hoist getSValBuilder() from the if sta

[PATCH] D35175: New option that adds the DiagID enum name and index to Diagnostic output.

2017-07-12 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. Great, thanks... https://reviews.llvm.org/D35175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [clang-tools-extra] r303735 - Modify test so that it looks for patterns in stderr as well

2017-07-12 Thread Alexander Kornienko via cfe-commits
Done in r307661. On Mon, Jul 10, 2017 at 2:08 PM, Alexander Kornienko wrote: > Benjamin has actually fixed the issue by reverting to the old behavior in > r306822. > I'll add a test for this behavior anyway. > > On Mon, Jul 10, 2017 at 11:47 AM, Alexander Kornienko > wrote: > >> Sorry, missed

[PATCH] D34949: [refactor][rename] Use a single base class for class that finds a declaration at location and for class that searches for all occurrences of a specific declaration

2017-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. LGTM. Comment at: include/clang/Tooling/Refactoring/RecursiveSymbolVisitor.h:33 +: public RecursiveASTVisitor> { + using BaseType = RecursiveASTVisitor>; + const SourceManager &SM; nit: I'd add a `pri

Re: [clang-tools-extra] r303735 - Modify test so that it looks for patterns in stderr as well

2017-07-12 Thread David Blaikie via cfe-commits
Thanks all! On Wed, Jul 12, 2017 at 7:46 AM Alexander Kornienko wrote: > Done in r307661. > > On Mon, Jul 10, 2017 at 2:08 PM, Alexander Kornienko > wrote: > >> Benjamin has actually fixed the issue by reverting to the old behavior in >> r306822. >> I'll add a test for this behavior anyway. >>

[PATCH] D35306: [diagtool] Add the 'find-diagnostic-id' subcommand that converts a name of the diagnostic to its enum value

2017-07-12 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Herald added a subscriber: mgorny. The new subcommand prints out the enum value of the diagnostic. This will be used in a utility script that invokes clang and forces it to stop when some specific diagnostic is emitted (see https://reviews.llvm.org/D35175 for dis

[PATCH] D34275: [analyzer] Re-implemente current virtual calls checker in a path-sensitive way

2017-07-12 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Thank you! I think we can start to run this check on real world code bases and evaluate the results. Comment at: lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp:41 + void checkPreCall(const CallEvent &Call, CheckerContext &C) const; + void Chang

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 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. Some small comments, otherwise looks good. Comment at: lib/Format/TokenAnnotator.cpp:1706 +if (NextNonCommentLine && CommentLine) { + bool UpdateLevel = NextNonCom

[PATCH] D31700: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.

2017-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 106219. hokein marked an inline comment as done. hokein added a comment. Herald added subscribers: xazax.hun, JDevlieghere. Support more cases. https://reviews.llvm.org/D31700 Files: clang-tidy/google/AvoidCStyleCastsCheck.cpp test/clang-tidy/google-read

[PATCH] D31700: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.

2017-07-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. > You might want to commit this at some point ;] I somewhat forgot this minor patch. Comment at: clang-tidy/google/AvoidCStyleCastsCheck.cpp:139 ")"); + ReplaceRange = CharSourceRange::getCharRange(CastExpr->getLParenLoc(), +

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 106220. krasimir marked 2 inline comments as done. krasimir added a comment. - Address review comments https://reviews.llvm.org/D35296 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTest.cpp unittests/Format/FormatTestComments.cpp Index

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-07-12 Thread Francois Ferrand via Phabricator via cfe-commits
Typz updated this revision to Diff 106221. Typz marked 3 inline comments as done. Typz added a comment. Rename option to AlignAfterOperator https://reviews.llvm.org/D32478 Files: include/clang/Format/Format.h lib/Format/ContinuationIndenter.cpp lib/Format/ContinuationIndenter.h lib/Form

[PATCH] D35296: [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307795: [clang-format] Keep level of comment before an empty line (authored by krasimir). Repository: rL LLVM https://reviews.llvm.org/D35296 Files: cfe/trunk/lib/Format/TokenAnnotator.cpp cfe/tru

r307795 - [clang-format] Keep level of comment before an empty line

2017-07-12 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Wed Jul 12 08:21:43 2017 New Revision: 307795 URL: http://llvm.org/viewvc/llvm-project?rev=307795&view=rev Log: [clang-format] Keep level of comment before an empty line Summary: This patch fixes bug https://bugs.llvm.org/show_bug.cgi?id=3313: a comment line was aligned wit

[PATCH] D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check.

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added inline comments. This revision now requires changes to proceed. Comment at: clang-tidy/bugprone/UndefinedMemoryManipulationCheck.cpp:22 +AST_MATCHER(CXXRecordDecl, isNotTriviallyCopyable) { + return !(Node.isTriviallyCopyab

[PATCH] D32700: [clang-tidy] Add bugprone-suspicious-memset-usage check.

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/bugprone/SuspiciousMemsetUsageCheck.cpp:127-130 +SourceRange LHSRange = FillChar->getSourceRange(); +SourceRange RHSRange = ByteCount->getSourceRange(); +StringRef RHSString = getAsString(Result, RHSRange); +Str

Re: [clang-tools-extra] r307701 - Fix clang-tidy diagnostic.cpp test on Windows

2017-07-12 Thread Alexander Kornienko via cfe-commits
Thank you! On Tue, Jul 11, 2017 at 10:22 PM, Reid Kleckner via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rnk > Date: Tue Jul 11 13:22:17 2017 > New Revision: 307701 > > URL: http://llvm.org/viewvc/llvm-project?rev=307701&view=rev > Log: > Fix clang-tidy diagnostic.cpp test on Win

[PATCH] D35306: [diagtool] Add the 'find-diagnostic-id' subcommand that converts a name of the diagnostic to its enum value

2017-07-12 Thread don hinton via Phabricator via cfe-commits
hintonda accepted this revision. hintonda added a comment. This revision is now accepted and ready to land. LGTM. Category ids' might be useful, but I'd wait until someone actually needs them. Repository: rL LLVM https://reviews.llvm.org/D35306

[PATCH] D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check.

2017-07-12 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs updated this revision to Diff 106234. rnkovacs added a comment. Herald added a subscriber: baloghadamsoftware. Removed redundant parens and stray semicolons. https://reviews.llvm.org/D35051 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang

[PATCH] D33719: Add _Float16 as a C/C++ source language type

2017-07-12 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer updated this revision to Diff 106228. SjoerdMeijer added a comment. This fixes: - type mangling for `_Float16` (approved here: https://github.com/itanium-cxx-abi/cxx-abi/pull/22, but not yet committed. ) - removed the argument promotion for `_Float16` that I added because it turns

[PATCH] D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check.

2017-07-12 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs marked 2 inline comments as done. rnkovacs added inline comments. Comment at: clang-tidy/bugprone/UndefinedMemoryManipulationCheck.cpp:39 + // Check whether source object is not TriviallyCopyable. + // Only applicable to memcpy() and memmove(). + Finder->addMatcher( -

[PATCH] D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check.

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Comment at: clang-tidy/bugprone/UndefinedMemoryManipulationCheck.cpp:39 + // Check whether source object is not TriviallyCopyable. + // Only applicable to memcpy() and m

[PATCH] D31700: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.

2017-07-12 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG. Thanks! https://reviews.llvm.org/D31700 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35118: [AArch64] Add support for handling the +sve target feature

2017-07-12 Thread Renato Golin via Phabricator via cfe-commits
rengolin added a reviewer: jmolloy. rengolin added a subscriber: jmolloy. rengolin added a comment. @jmolloy Can you check this change, please? Comment at: lib/Basic/Targets.cpp:6245 enum FPUModeEnum { -FPUMode, -NeonMode +NeonMode = (1 << 0), +SveMode = (1 <

[PATCH] D35230: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo

2017-07-12 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307809: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35230?vs=105937&id=106240#toc Repository: rL

r307809 - [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo

2017-07-12 Thread Chih-Hung Hsieh via cfe-commits
Author: chh Date: Wed Jul 12 09:25:40 2017 New Revision: 307809 URL: http://llvm.org/viewvc/llvm-project?rev=307809&view=rev Log: [clang] buildFixItInsertionLine should use Hints of the same FID and LineNo Fix bug https://bugs.llvm.org/show_bug.cgi?id=33734 Differential Revision: https://reviews

[clang-tools-extra] r307810 - [clang-tidy] add regression test to performance-unnecessary-value-param

2017-07-12 Thread Chih-Hung Hsieh via cfe-commits
Author: chh Date: Wed Jul 12 09:27:00 2017 New Revision: 307810 URL: http://llvm.org/viewvc/llvm-project?rev=307810&view=rev Log: [clang-tidy] add regression test to performance-unnecessary-value-param This test shows the problem in https://bugs.llvm.org/show_bug.cgi?id=33734 Differential Revisi

[PATCH] D35225: [clang-tidy] add regression test to performance-unnecessary-value-param

2017-07-12 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307810: [clang-tidy] add regression test to performance-unnecessary-value-param (authored by chh). Changed prior to commit: https://reviews.llvm.org/D35225?vs=106064&id=106241#toc Repository: rL LLVM

[PATCH] D32478: [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set

2017-07-12 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. I renamed the option to `AlignAfterOperator`, is it acceptable now? (I also thought of `UnindentOperator`, but I think it is better to keep the notion of alignment) Note that this style is used in multiple open-source projects: Skia , parts of QtCreator

[clang-tools-extra] r307812 - [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.

2017-07-12 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Jul 12 09:38:59 2017 New Revision: 307812 URL: http://llvm.org/viewvc/llvm-project?rev=307812&view=rev Log: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr. Summary: Before the change: `auto i = (Enum) 5;` => `auto i = static_cast( 5);` After the ch

[PATCH] D31700: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr.

2017-07-12 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307812: [clang-tidy] Ignore blank spaces between cast's ")" and its sub expr. (authored by hokein). Repository: rL LLVM https://reviews.llvm.org/D31700 Files: clang-tools-extra/trunk/clang-tidy/goog

r307813 - [diagtool] Add a 'find-diagnostic-id' subcommand that converts a name of

2017-07-12 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Jul 12 09:41:49 2017 New Revision: 307813 URL: http://llvm.org/viewvc/llvm-project?rev=307813&view=rev Log: [diagtool] Add a 'find-diagnostic-id' subcommand that converts a name of the diagnostic to its enum value This will be used by a script that invokes clang in a de

  1   2   >