[PATCH] D47632: [ASTImporter] Refactor Decl creation

2018-07-11 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. This revision is now accepted and ready to land. Thank you Gabor! I apologize for the delay in reviewing patches. Repository: rC Clang https://reviews.llvm.org/D47632 ___ cfe-commits m

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-11 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In https://reviews.llvm.org/D49114#1159211, @Eugene.Zelenko wrote: > C++ Core Guidelines contains ES.45: Avoid "magic constants"; use symbolic > constants > , > so I think check

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D49114#1159327, @0x8000- wrote: > In https://reviews.llvm.org/D49114#1159211, @Eugene.Zelenko wrote: > > > C++ Core Guidelines contains ES.45: Avoid "magic constants"; use symbolic > > constants > >

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-11 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added inline comments. Comment at: docs/clang-tidy/checks/readability-magic-numbers.rst:11 + + double circleArea = 3.1415926535 * radius * radius; + Quuxplusone wrote: > 0x8000- wrote: > > Eugene.Zelenko wrote: > > > JonasToth wrote: > > > > Thi

r336863 - os_log: When there are multiple privacy annotations in the format

2018-07-11 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Wed Jul 11 15:19:14 2018 New Revision: 336863 URL: http://llvm.org/viewvc/llvm-project?rev=336863&view=rev Log: os_log: When there are multiple privacy annotations in the format string, choose the strictest one instead of the last. Also fix an undefined behavior. Move the p

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-11 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: docs/clang-tidy/checks/readability-magic-numbers.rst:11 + + double circleArea = 3.1415926535 * radius * radius; + 0x8000- wrote: > Quuxplusone wrote: > > 0x8000- wrote: > > > Eugene.Zelenko wrote: > > > > J

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-11 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 155078. 0x8000- edited the summary of this revision. 0x8000- added a comment. Updated examples code and added several references Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 Files: clang-tidy/readability/CMakeLists.txt

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:158 +- New :doc:`readability-magic-numbers + ` check. + Please make link short. See other links as examples.

[PATCH] D48764: [Analyzer] Hotfix for iterator checkers: Mark left-hand side of `SymIntExpr` objects as live in the program state maps.

2018-07-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Looks good with minor comments. Comment at: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp:493 +for (auto i = Offset->symbol_begin(); i != Offset->symbol_end(); ++i) + SR.markLive(*i); } Let's only mark `SymbolData`-type symbol

[libcxx] r336866 - [libc++] Take 2: Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY

2018-07-11 Thread Louis Dionne via cfe-commits
Author: ldionne Date: Wed Jul 11 16:14:33 2018 New Revision: 336866 URL: http://llvm.org/viewvc/llvm-project?rev=336866&view=rev Log: [libc++] Take 2: Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY Summary: We never actually mean to always inline a function -- all the uses of

[PATCH] D48892: [libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY

2018-07-11 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. Pushing since I got an offline O.K. from Eric. Repository: rL LLVM https://reviews.llvm.org/D48892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D48892: [libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY

2018-07-11 Thread Louis Dionne via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL336866: [libc++] Take 2: Replace uses of _LIBCPP_ALWAYS_INLINE by… (authored by ldionne, committed by ). Changed prior to

[PATCH] D48892: [libc++] Replace uses of _LIBCPP_ALWAYS_INLINE by _LIBCPP_INLINE_VISIBILITY

2018-07-11 Thread Louis Dionne via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rCXX336866: [libc++] Take 2: Replace uses of _LIBCPP_ALWAYS_INLINE by… (authored by ldionne, committed by ). Changed prior

r336867 - Fix deduction for conversion function templates converting to reference

2018-07-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Wed Jul 11 16:19:41 2018 New Revision: 336867 URL: http://llvm.org/viewvc/llvm-project?rev=336867&view=rev Log: Fix deduction for conversion function templates converting to reference types. We previously tried to use the "parameter is a reference" logic here, but that doesn'

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-11 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 155084. 0x8000- added a comment. Update documentation to clean up formatting Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/MagicNumbersCheck.cpp clang-

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-11 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked 3 inline comments as done. 0x8000- added a comment. Thank you for your review @Eugene.Zelenko Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-11 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/ReleaseNotes.rst:158 +- New :doc:`readability-magic-numbers + ` check. + .html is not needed. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 __

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-11 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked an inline comment as done. 0x8000- added a comment. Remove extraneous .html. Sorry for not seeing it earlier. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D49114: [clang-tidy] Add a check for "magic numbers"

2018-07-11 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 155089. 0x8000- added a comment. Fix typo Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49114 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/MagicNumbersCheck.cpp clang-tidy/readability/MagicNumbersCheck.

[PATCH] D48958: [clang][ubsan] Implicit Cast Sanitizer - integer truncation - clang part

2018-07-11 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a subscriber: klimek. vsk added inline comments. Comment at: lib/CodeGen/CGExprScalar.cpp:1694 // handle things like function to ptr-to-function decay etc. Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { Expr *E = CE->getSubExpr(); lebedev.

[PATCH] D49209: CodeGen: specify alignment for automatic variable initialization

2018-07-11 Thread JF Bastien via Phabricator via cfe-commits
jfb created this revision. Herald added subscribers: cfe-commits, dexonsmith. Automatic variable initialization was generating default-aligned stores (which are deprecated) instead of using the known alignment from the alloca. Repository: rC Clang https://reviews.llvm.org/D49209 Files: li

[PATCH] D48681: [CFG] [analyzer] Add construction contexts for function arguments.

2018-07-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 155091. NoQ added a comment. Address my own comments. https://reviews.llvm.org/D48681 Files: include/clang/Analysis/CFG.h include/clang/Analysis/ConstructionContext.h lib/Analysis/CFG.cpp lib/Analysis/ConstructionContext.cpp lib/StaticAnalyzer/Core/Ex

[PATCH] D49209: CodeGen: specify alignment for automatic variable initialization

2018-07-11 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:902 +Builder.CreateAlignedStore( +Init, Loc, Loc->getPointerAlignment(CGM.getDataLayout()), isVolatile); return; llvm::Value::getPointerAlignment is not the right way to compute t

[PATCH] D49210: [CFG] [analyzer] NFC: Enumerate construction context layer kinds and re-use their code for ExprEngine keys.

2018-07-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, mikhail.ramalho, baloghadamsoftware. This is a refactoring patch; no functional change intended. `ConstructionContext` is composed of `Const

[PATCH] D22391: [Sema] Add warning for implicitly casting a null constant to a non null pointer type

2018-07-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/nullability_nullonly.mm:103 void testObjCARCExplicitZeroInitialization() { - TestObject * _Nonnull explicitlyZeroInitialized = nil; // expected-warning {{nil assigned to a pointer which is expected to have non-null value}} +

[PATCH] D27202: [analyzer] Do not conjure a symbol for return value of a conservatively evaluated function

2018-07-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ abandoned this revision. NoQ added a comment. Herald added subscribers: mikhail.ramalho, rnkovacs, szepet. Herald added a reviewer: george.karpenkov. Outdated by https://reviews.llvm.org/D44131. https://reviews.llvm.org/D27202 ___ cfe-commits ma

[PATCH] D49213: [analyzer] pr38072: Suppress an assertion failure for eliding the same destructor twice due to the default argument problem.

2018-07-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, mikhail.ramalho, baloghadamsoftware. @alexfh provided an example that demonstrates that elided copy constructors may get agglutinated due to

[PATCH] D49213: [analyzer] pr38072: Suppress an assertion failure for eliding the same destructor twice due to the default argument problem.

2018-07-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:432-433 ConstructedObjectKey Key(Item, LC->getCurrentStackFrame()); // FIXME: Currently the state might already contain the marker due to // incorrect handling of temporaries bound to default p

[PATCH] D49058: [analyzer] Move DanglingInternalBufferChecker out of alpha

2018-07-11 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @rnkovacs Do you have evaluation statistics handy for this checker? How many bugs it finds, on which projects? How many of those are real bugs? https://reviews.llvm.org/D49058 ___ cfe-commits mailing list cfe-commi

[PATCH] D49215: [analyzer] Admit that some copy/move constructors have more than one argument.

2018-07-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, mikhail.ramalho, baloghadamsoftware. Copy/move constructors may have additional default arguments and still be treated as normal copy/move c

[PATCH] D49215: [analyzer] Admit that some copy/move constructors have more than one argument.

2018-07-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 155105. NoQ added a comment. Actually verify the CFG in the test. https://reviews.llvm.org/D49215 Files: lib/Analysis/CFG.cpp test/Analysis/cfg-rich-constructors.cpp Index: test/Analysis/cfg-rich-constructors.cpp ==

[libcxx] r336880 - Turns out that wide literals U"xxx" and u"xxx" are c++11 and later.

2018-07-11 Thread Marshall Clow via cfe-commits
Author: marshall Date: Wed Jul 11 19:55:01 2018 New Revision: 336880 URL: http://llvm.org/viewvc/llvm-project?rev=336880&view=rev Log: Turns out that wide literals U"xxx" and u"xxx" are c++11 and later. Modified: libcxx/trunk/test/std/strings/string.view/string.view.cons/assign.pass.cpp Mod

[PATCH] D48862: Fix lib paths for OpenEmbedded targets

2018-07-11 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 155112. mgrang added a reviewer: hfinkel. mgrang added a comment. Added tests for C++ headers search. https://reviews.llvm.org/D48862 Files: lib/Driver/ToolChains/Gnu.cpp lib/Driver/ToolChains/Linux.cpp test/Driver/Inputs/openembedded_aarch64_linux_tr

[PATCH] D48266: [Driver] Add -fno-digraphs

2018-07-11 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes updated this revision to Diff 155115. jtbandes added a comment. - remove diagnostic; fix formatting Repository: rC Clang https://reviews.llvm.org/D48266 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Clang.cpp lib/Frontend/CompilerInvocation.cpp test/Lexer/digr

[PATCH] D48266: [Driver] Add -fno-digraphs

2018-07-11 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes marked 2 inline comments as done. jtbandes added a comment. If I understood your comment correctly, you meant to remove the diagnostic completely (regardless of whether `-fdigraphs` or `-fno-digraphs` is given, and regardless of whether digraphs were enabled for the selected language)?

[PATCH] D48266: [Driver] Add -fno-digraphs

2018-07-11 Thread Jacob Bandes-Storch via Phabricator via cfe-commits
jtbandes updated this revision to Diff 155116. jtbandes marked an inline comment as done. jtbandes added a comment. - include %:%: in help text Repository: rC Clang https://reviews.llvm.org/D48266 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Clang.cpp lib/Frontend/Compi

[PATCH] D49063: [libclang] Add support for ObjCObjectType

2018-07-11 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: include/clang-c/Index.h:35 #define CINDEX_VERSION_MAJOR 0 #define CINDEX_VERSION_MINOR 49 Please, increment the minor version (you are adding new functions) Comment at: include/clang-c/Index.h:3644 +

<    1   2