[PATCH] D47290: [Sema] -Wformat-pedantic only for NSInteger/NSUInteger %zu/%zi on Darwin

2018-05-23 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: test/FixIt/fixit-format-ios-nopedantic.m:21 + printf("test 4: %zd %zd", getNSInteger(), getNSInteger()); +} maybe i'm missing smth, but i don't see any verification in this test. Repository: rC Clang https://revie

[PATCH] D38214: [analyzer] Fix crash on modeling of pointer arithmetic

2017-09-25 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314141: [analyzer] Fix crash on modeling of pointer arithmetic (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D38214?vs=116455&id=116590#toc Repository: rL LLVM https://re

[PATCH] D38270: [clang] Add getUnsignedPointerDiffType method

2017-09-26 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. C11 standard refers to the unsigned counterpart of the type ptrdiff_t in the paragraph 7.19.6 where it defines the format specifier %tu. In Clang (in PrintfFormatString.cpp, lines 508-510) there is a FIXME for this case, in particular, right now Clang doesn't diag

[PATCH] D38270: [clang] Add getUnsignedPointerDiffType method

2017-09-26 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 116635. alexshap added a comment. fix typo Repository: rL LLVM https://reviews.llvm.org/D38270 Files: include/clang/AST/ASTContext.h include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp Index: lib/AST/ASTContext.cpp ==

[PATCH] D38270: [clang] Add getUnsignedPointerDiffType method

2017-09-27 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 116894. alexshap added a comment. Address the comments Repository: rL LLVM https://reviews.llvm.org/D38270 Files: include/clang/AST/ASTContext.h include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp lib/Analysis/PrintfFormatString.cpp lib/An

[PATCH] D38270: [clang] Add getUnsignedPointerDiffType method

2017-09-28 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 117061. alexshap added a comment. Add positive tests Repository: rL LLVM https://reviews.llvm.org/D38270 Files: include/clang/AST/ASTContext.h include/clang/Basic/TargetInfo.h lib/AST/ASTContext.cpp lib/Analysis/PrintfFormatString.cpp lib/Anal

[PATCH] D38270: [clang] Add getUnsignedPointerDiffType method

2017-09-28 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314470: [clang] Add getUnsignedPointerDiffType method (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D38270?vs=117061&id=117075#toc Repository: rL LLVM https://reviews.llv

[PATCH] D38859: [clang] Enable clang build with LLVM_BUILD_INSTRUMENTED without setting LLVM_PROFTDATA

2017-10-12 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. Herald added a subscriber: mgorny. At the moment if LLVM_BUILD_INSTRUMENTED is set to True one has to set LLVM_PROFTDATA even if it's not necessary (because of message(FATAL_ERROR ...)). Building instrumented Clang is useful even if one doesn't plan to use the t

[PATCH] D38859: [clang] Enable clang build with LLVM_BUILD_INSTRUMENTED without setting LLVM_PROFTDATA

2017-10-12 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. yeah, i agree, this is not a good idea. My thoughts were different - right now it's not particularly convenient that one has to specify LLVM_PROFDATA when it's not actually used by the build. Maybe we can create the target "generate-profdata" only if LLVM_PROFDATA is se

[PATCH] D38859: [clang] Enable clang build with LLVM_BUILD_INSTRUMENTED without setting LLVM_PROFTDATA

2017-10-12 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 118868. Repository: rL LLVM https://reviews.llvm.org/D38859 Files: utils/perf-training/CMakeLists.txt Index: utils/perf-training/CMakeLists.txt === --- utils/perf-training/CMakeLists.txt

[PATCH] D38859: [clang] Enable clang build with LLVM_BUILD_INSTRUMENTED without setting LLVM_PROFTDATA

2017-10-12 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 118869. alexshap added a comment. Update the wording Repository: rL LLVM https://reviews.llvm.org/D38859 Files: utils/perf-training/CMakeLists.txt Index: utils/perf-training/CMakeLists.txt

[PATCH] D38859: [clang] Enable clang build with LLVM_BUILD_INSTRUMENTED without setting LLVM_PROFTDATA

2017-10-12 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315665: [clang] Enable clang build with LLVM_BUILD_INSTRUMENTED without setting… (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D38859?vs=118869&id=118881#toc Repository: r

[PATCH] D39174: [analyzer] Fix handling of labels getLValueElement

2017-10-22 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. Herald added subscribers: szepet, xazax.hun. In getLValueElement Base may represent the address of a label (as in the newly-added test case), in this case it's not a loc::MemRegionVal and Base.castAs() triggers an assert. Test plan: make check-all Repository:

[PATCH] D39174: [analyzer] Fix handling of labels in getLValueElement

2017-10-23 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316399: [analyzer] Fix handling of labels in getLValueElement (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D39174?vs=119808&id=119972#toc Repository: rL LLVM https://rev

[PATCH] D33470: [clang-tidy] Add misc-default-numerics

2017-05-25 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: clang-tidy/misc/DefaultNumericsCheck.h:20 +/// This check flags usages of ``std::numeric_limits::{min,max}()`` for +/// unspecialized types. It is dangerous because it returns T(), which might is +/// rarely minimum or maximum for this

[PATCH] D33976: [clang] Fix format specifiers fixits

2017-06-06 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. This diff fixes printf "fixits" in the case when there is a wrapping macro and the format string needs multiple replacements. In the presence of a macro there was an extra logic in EditedSource.cpp to handle multiple uses of the same macro argument (see the old co

[PATCH] D33976: [clang] Fix format specifiers fixits

2017-06-08 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. @mehdi_amini , thanks, i see, regarding the "opposite issue" - probably an example / test case would be helpful, that looks like a separate issue. Thanks for adding @ahatanak and @arphaman, that would be wonderful if smb could look at this diff (which, besides the fix,

[PATCH] D33976: [clang] Fix format specifiers fixits

2017-06-08 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 101962. alexshap added a comment. Address comments Repository: rL LLVM https://reviews.llvm.org/D33976 Files: include/clang/Edit/EditedSource.h lib/Edit/EditedSource.cpp test/FixIt/fixit-format-darwin.m Index: test/FixIt/fixit-format-darwin.m ===

[PATCH] D33976: [clang] Fix format specifiers fixits

2017-06-08 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305018: [clang] Fix format specifiers fixits (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D33976?vs=101962&id=101964#toc Repository: rL LLVM https://reviews.llvm.org/D33

[PATCH] D34066: [clang] Cleanup fixit.c

2017-06-09 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. This diff removes temporary file t2 in fixit.c and updates the test command accordingly. NFC. Repository: rL LLVM https://reviews.llvm.org/D34066 Files: fixit.c Index: fixit.c === --- fixit.c

[PATCH] D34066: [clang] Cleanup fixit.c

2017-06-09 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305124: [clang] Cleanup fixit.c (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D34066?vs=102076&id=102079#toc Repository: rL LLVM https://reviews.llvm.org/D34066 Files:

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-15 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. ExpansionLoc was previously calculated incorrectly in the case of nested macros expansions. In this diff we build the stack of expansions where the last one is the actual expansion (in the source code) which should be used for grouping together the edits. The de

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-15 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 102781. alexshap added a comment. minor update Repository: rL LLVM https://reviews.llvm.org/D34268 Files: include/clang/Edit/EditedSource.h lib/Edit/EditedSource.cpp test/FixIt/fixit-format-darwin.m Index: test/FixIt/fixit-format-darwin.m ===

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

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

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-19 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 103090. alexshap added a comment. Address code review comments Repository: rL LLVM https://reviews.llvm.org/D34268 Files: include/clang/Edit/EditedSource.h lib/Edit/EditedSource.cpp test/FixIt/fixit-format-darwin.m Index: test/FixIt/fixit-format-

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-19 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap marked 3 inline comments as done. alexshap added inline comments. Comment at: lib/Edit/EditedSource.cpp:80 + return ArgUse.Identifier == U.Identifier && + std::tie(ArgUse.ExpansionStack, ArgUse.Use) != + std::tie(U.ExpansionSt

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-19 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap planned changes to this revision. alexshap marked an inline comment as done. alexshap added a comment. probably we don't need to keep the entire expansion stack in MacroArgUse (i was doing that because it was easier to understand what's going on). I will update this diff soon. Reposito

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-19 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 103093. alexshap added a comment. update, rerun the tests Repository: rL LLVM https://reviews.llvm.org/D34268 Files: include/clang/Edit/EditedSource.h lib/Edit/EditedSource.cpp test/FixIt/fixit-format-darwin.m Index: test/FixIt/fixit-format-darwi

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-20 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305845: [clang] Fix format specifiers fixits for nested macros (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D34268?vs=103093&id=103262#toc Repository: rL LLVM https://re

[PATCH] D34496: [clang] Fix printf check for CFIndex

2017-06-22 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap planned changes to this revision. alexshap added a comment. ignore this diff for now, i will update it soon. Repository: rL LLVM https://reviews.llvm.org/D34496 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D34496: [clang] Fix printf check for CFIndex

2017-06-22 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 103536. alexshap added a comment. update the tests Repository: rL LLVM https://reviews.llvm.org/D34496 Files: lib/Sema/SemaChecking.cpp test/FixIt/fixit-format-darwin.m test/FixIt/format-darwin.m Index: test/FixIt/format-darwin.m

[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

2017-12-13 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:1976 +unsigned FileEndOffset = SM.getFileOffset(SM.getLocForEndOfFile(FID)); +for (unsigned i=Offset; BufferStart[i] != '\n' && i < FileEndOffset; ++i) + Ostream << BufferStar

[PATCH] D40809: [WIP] [analyzer] Dump counterexample traces as C programs

2017-12-15 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. Are there any plans to add tests for this ? https://reviews.llvm.org/D40809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D43741: [Analyzer] More accurate modeling about the increment operator of the operand with type bool.

2018-03-01 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. i see, but just in case - what about the decrement operator ? Repository: rC Clang https://reviews.llvm.org/D43741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D52296: [Clang] - Add -gsingle-file-split-dwarf option.

2018-10-09 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. @grimar, this is an interesting observation which I've had on my mind for quite some time as well; a couple of things which I have not double-checked yet - just in case - do both gold and lld completely ignore dwo-related sections ? (did you check that ?), and another

[PATCH] D52296: [Clang] - Add -gsingle-file-split-dwarf option.

2018-10-15 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. I see, many thanks. I've cherry-picked this patch locally and played with GDB - it appears to work fine with it. I'm also interested and support this change since this would simplify the adoption of Fission by some build systems. @dblaikie, @echristo - are there any pa

[PATCH] D52296: [Clang] - Add -gsingle-file-split-dwarf option.

2018-10-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. I talked to David @dblaikie offline about this diff yesterday, if I understood correctly this change is reasonable in general, @echristo Eric, would you mind having a look at this diff ? https://reviews.llvm.org/D52296 _

[PATCH] D52296: [Clang] - Add -gsingle-file-split-dwarf option.

2018-10-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. Ping https://reviews.llvm.org/D52296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D53206: Allow padding checker to traverse simple class hierarchies

2018-10-29 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC345558: [analyzer] Allow padding checker to traverse simple class hierarchies (authored by alexshap, committed by ). Repository: rC Clang https://reviews.llvm.org/D53206 Files: lib/StaticAnalyzer/Ch

[PATCH] D37120: [analyzer] Fix modeling arithmetic

2017-08-25 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:371-373 +return makeSymExprValNN( +state, op, lhs.castAs(), +rhs.castAs(), resultTy); NoQ wrote: > For now this code would return

[PATCH] D37120: [analyzer] Fix modeling arithmetic

2017-08-25 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:363 case nonloc::LocAsIntegerKind: return evalBinOpLL(state, op, lhsL, rhs.castAs().getLoc(), @NoQ , @dcoughlin while we a

[PATCH] D37120: [analyzer] Fix modeling arithmetic

2017-08-26 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 112784. alexshap added a comment. Return UnknownVal for non-comparison operations. Add FIXME (improve modeling of "pointers as integers"). Repository: rL LLVM https://reviews.llvm.org/D37120 Files: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp test/

[PATCH] D37120: [analyzer] Fix modeling arithmetic

2017-08-28 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. updated the patch per suggestion by @NoQ Repository: rL LLVM https://reviews.llvm.org/D37120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37120: [analyzer] Fix modeling arithmetic

2017-08-28 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311935: [analyzer] Fix crash in modeling arithmetic (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D37120?vs=112784&id=112967#toc Repository: rL LLVM https://reviews.llvm.

[PATCH] D38151: [clang] Fix isExternC matcher docs

2017-09-21 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. Herald added a subscriber: klimek. The wording in the documentation for the matcher isExternC appears to be misleading since this matcher is applicable to functions and variables as well. This diff changes the comment regenerates the html file. Repository: rL

[PATCH] D38159: [clang] Fix printf fixit for objc specific types

2017-09-21 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. Let's take a look at the following example: for the triple thumbv7-apple-ios8.0.0 ssize_t is long and size_t is unsigned long, while NSInteger is int and NSUinteger is unsigned int. Following https://developer.apple.com/library/content/documentation/Cocoa/Concept

[PATCH] D38159: [clang] Fix printf fixit for objc specific types

2017-09-22 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314011: [clang] Fix printf fixit for objc specific types (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D38159?vs=116288&id=116380#toc Repository: rL LLVM https://reviews.

[PATCH] D38151: [clang] Fix isExternC matcher docs

2017-09-22 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL314022: [clang] Fix isExternC matcher docs (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D38151?vs=116251&id=116386#toc Repository: rL LLVM https://reviews.llvm.org/D3815

[PATCH] D38214: [analyzer] Fix crash on modeling of pointer arithmetic

2017-09-25 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. Herald added a subscriber: xazax.hun. This patch attempts to fix analyzer's crash on the newly added test case (see also https://bugs.llvm.org/show_bug.cgi?id=34374). Pointer subtraction appears to be modeled incorrectly in the following example: char* p; long

[PATCH] D60974: Clang IFSO driver action.

2019-06-03 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: clang/lib/Frontend/InterfaceStubFunctionsConsumer.cpp:30 +uint8_t Binding; +MangledSymbol() = delete; +MangledSymbol(const std::string &Name, const std::string &ParentName, would be nice to have a newline be

[PATCH] D45897: Convert clang-interpreter to ORC JIT API

2018-04-20 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: examples/clang-interpreter/main.cpp:52 +class SimpleJIT { +private: + ExecutionSession ES; not needed Comment at: examples/clang-interpreter/main.cpp:84 + + TargetMachine &getTargetMachine() { retur

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-05 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: lib/Sema/SemaLambda.cpp:1548 + // Find the end of the explicit capture for use in fixits. + SourceLocation EndLoc; + if (From.isThisCapture() && From.isCopyCapture()) { maybe these lines 1548 -1559 can be

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-05 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: lib/Sema/SemaLambda.cpp:1548 + // Find the end of the explicit capture for use in fixits. + SourceLocation EndLoc; + if (From.isThisCapture() && From.isCopyCapture()) { alexshap wrote: > maybe these lines

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-10 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. I'm kind of interested in this fixit, but one thought which i have - probably it should be more conservative (i.e. fix captures by reference, integral types, etc) (since the code might rely on side-effects of copy-ctors/move-ctors or extend the lifetime of an object),

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-11 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. > Are you talking about a more conservative warning or a more conservative > fixit? If it doesn't make sense for us to have a fixit for a particular > capture, does it make sense for us to have a warning for that >capture in the > first place? to be honest i'm more co

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-13 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap accepted this revision. alexshap added a comment. This revision is now accepted and ready to land. to me LG Repository: rC Clang https://reviews.llvm.org/D48845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D48845: [Sema] Add fixit for unused lambda captures

2018-07-16 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337148: [Sema] Add fixit for unused lambda captures (authored by alexshap, committed by ). Changed prior to commit: https://reviews.llvm.org/D48845?vs=155616&id=155624#toc Repository: rC Clang https

[PATCH] D41042: [analyzer] StackAddrEscape: Delay turning on by default a little bit?

2017-12-08 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap accepted this revision. alexshap added a comment. This revision is now accepted and ready to land. i see, to be honest, this is kind of unfortunate, if i am not mistaken, i've seen these false-positives, but not too many, most reports were real bugs. But if it's annoying, than i think i

[PATCH] D132713: [clang-tidy] Skip union-like classes in use-equals-default

2022-08-29 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132713/new/ https://reviews.llvm.org/D132713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[PATCH] D132713: [clang-tidy] Skip union-like classes in use-equals-default

2022-08-30 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp:220 void UseEqualsDefaultCheck::registerMatchers(MatchFinder *Finder) { - // Skip unions since constructors with empty bodies behave differently - // in c

[PATCH] D132713: [clang-tidy] Skip union-like classes in use-equals-default

2022-08-30 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 456800. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132713/new/ https://reviews.llvm.org/D132713 Files: clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp clang-tools-extra/doc

[PATCH] D132998: [clang-tidy] Restrict use-equals-default to c++11-or-later

2022-08-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: gribozavr2, njames93, aaron.ballman. alexander-shaposhnikov created this object with visibility "All Users". Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. alexander-shaposhnikov

[PATCH] D132998: [clang-tidy] Restrict use-equals-default to c++11-or-later

2022-08-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. My assumption was that a codebase needs to compile with c++11 in the first place - otherwise the automatic fixit will break the build (as it happens right now). I was looking at modernize/UseOverrideCheck.h - it requires c++11 and this seemed to be quite

[PATCH] D133006: [clang-tidy] Skip copy assignment operators with nonstandard return types

2022-08-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: njames93, gribozavr2, aaron.ballman. alexander-shaposhnikov created this object with visibility "All Users". Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. alexander-shaposhnikov

[PATCH] D132998: [clang-tidy] Restrict use-equals-default to c++11-or-later

2022-08-31 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. Regarding the practical side - yeah, I've come across this issue (and others) while trying to run this check over a few large codebases (including LLVM and Chrome), and this particular issue accounts of a few hundreds of build breakages. Repository: rG

[PATCH] D133197: [clang] Fix crash when parsing scanf format string with missing arguments

2022-09-02 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133197/new/ https://reviews.llvm.org/D133197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists

[PATCH] D132998: [clang-tidy] Restrict use-equals-default to c++11-or-later

2022-09-02 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG47dbacbc8ae2: [clang-tidy] Restrict use-equals-default to c++11-or-later (authored by alexander-shaposhnikov). Changed prior to commit: https://reviews.llvm.org/D132998?vs=456876&id=457715#toc Reposito

[PATCH] D133006: [clang-tidy] Skip copy assignment operators with nonstandard return types

2022-09-02 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa7395b860bc2: [clang-tidy] Skip copy assignment operators with nonstandard return types (authored by alexander-shaposhnikov). Changed prior to commit: https://reviews.llvm.org/D133006?vs=456902&id=45772

[PATCH] D132713: [clang-tidy] Skip union-like classes in use-equals-default

2022-09-04 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. gentle ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132713/new/ https://reviews.llvm.org/D132713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D132713: [clang-tidy] Skip union-like classes in use-equals-default

2022-09-06 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG44503482e0af: [clang-tidy] Skip union-like classes in use-equals-default (authored by alexander-shaposhnikov). Changed prior to commit: https://reviews.llvm.org/D132713?vs=456800&id=458258#toc Reposito

[PATCH] D133741: [IR] Add alignment for llvm.threadlocal.address

2022-09-12 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: ChuanqiXu, nikic, aeubanks. alexander-shaposhnikov created this object with visibility "All Users". Herald added a subscriber: hiraditya. Herald added a project: All. alexander-shaposhnikov requested review of thi

[PATCH] D133741: [IR] Add alignment for llvm.threadlocal.address

2022-09-13 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb6965f7246bb: [IR] Add alignment for llvm.threadlocal.address (authored by alexander-shaposhnikov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133741/new/

[PATCH] D35972: Add warning to clang-reorder-fields when reordering breaks member init list dependencies

2017-07-29 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap accepted this revision. alexshap added a comment. This revision is now accepted and ready to land. LGTM, thanks! do you have commit access ? (if not i can commit this patch for you) https://reviews.llvm.org/D35972 ___ cfe-commits mailing l

[PATCH] D35972: Add warning to clang-reorder-fields when reordering breaks member init list dependencies

2017-07-29 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL309505: [clang-reorder-fields] Emit warning when reordering breaks member init list… (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D35972?vs=108812&id=108818#toc Repository:

[PATCH] D35972: Add warning to clang-reorder-fields when reordering breaks member init list dependencies

2017-07-29 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. https://reviews.llvm.org/rL309505 plus I changed the code to emit this warning via DiagnosticEngine and updated the tests accordingly. Repository: rL LLVM https://reviews.llvm.org/D35972 ___ cfe-commits mailing list cf

[PATCH] D36564: [analyzer] Fix SimpleSValBuilder::simplifySVal

2017-08-09 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. Herald added a subscriber: xazax.hun. This diff attempts to address a crash (triggered assert) on the newly-added test case. The assert being discussed is inside SValBuilder::evalBinOp if (Optional RV = rhs.getAs()) { // Support pointer arithmetic where the

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-08-09 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:561 + // manager to handle these comparisons. + if (BinaryOperator::isComparisonOp(op) && + rhs.getSubKind() == nonloc::SymbolValKind) { some thoughts - e

[PATCH] D36564: [analyzer] Fix SimpleSValBuilder::simplifySVal

2017-08-14 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310887: [analyzer] Fix SimpleSValBuilder::simplifySVal (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D36564?vs=110502&id=111073#toc Repository: rL LLVM https://reviews.ll

[PATCH] D36715: [clang] minor cleanup in clang/tooling/refactoring

2017-08-14 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. 1. Add missing explicit. 2. Add missing std::move (return type is Expected> but we return std::vector, so cast to && is necessary). Test plan: make check-all Repository: rL LLVM https://reviews.llvm.org/D36715 Files: include/clang/Tooling/Refactoring/Rena

[PATCH] D36715: [clang] minor cleanup in clang/tooling/refactoring

2017-08-15 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310948: [clang] Code cleanup in clang/tooling (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D36715?vs=111078&id=111229#toc Repository: rL LLVM https://reviews.llvm.org/D3

[PATCH] D36851: [analyzer] Fix modeling of ctors

2017-08-17 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. Herald added a subscriber: xazax.hun. This diff attempts to fixe analyzer's crash (triggered assert) on the newly added test case. The assert being discussed is assert(!B.lookup(R, BindingKey::Direct)) in lib/StaticAnalyzer/Core/RegionStore.cpp, however the root c

[PATCH] D36851: [analyzer] Fix modeling of ctors

2017-08-17 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. >One alternative we discussed was performing this logic in RegionStore instead and skipping the default binding there >if we saw that the base region was empty. What do you think of that approach? (We would have to be careful for exactly the reasons described in

[PATCH] D36851: [analyzer] Fix modeling of ctors

2017-08-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 111622. alexshap added a comment. Skip the default binding for empty bases. Repository: rL LLVM https://reviews.llvm.org/D36851 Files: lib/StaticAnalyzer/Core/RegionStore.cpp test/Analysis/ctor.mm Index: test/Analysis/ctor.mm =

[PATCH] D36075: [refactor] Initial support for refactoring action rules

2017-08-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added inline comments. Comment at: include/clang/Basic/DiagnosticOr.h:40 + /// diagnostic. + DiagnosticOr(PartialDiagnosticAt Diagnostic) : HasDiagnostic(true) { +new (getDiagnosticStorage()) PartialDiagnosticAt(std::move(Diagnostic)); explicit ?

[PATCH] D36851: [analyzer] Fix modeling of ctors

2017-08-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL311182: [analyzer] Fix modeling of constructors (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D36851?vs=111622&id=111711#toc Repository: rL LLVM https://reviews.llvm.org/

[PATCH] D36564: [analyzer] Fix SimpleSValBuilder::simplifySVal

2017-08-24 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. @alexfh, thanks for letting me know, i will take a closer look at https://bugs.llvm.org/show_bug.cgi?id=34309 soon. Repository: rL LLVM https://reviews.llvm.org/D36564 ___ cfe-commits mailing list cfe-commits@lists.llvm

[PATCH] D36075: [refactor] Initial support for refactoring action rules

2017-08-24 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. @arphaman The selection requirement is supposed to be orthogonal to AST matchers, not a replacement. It should be used when working with source selection in editors. I did mess around with moving over clang-reorder-fields using this kind of model and didn't see an

[PATCH] D37120: [analyzer] Fix modeling arithmetic

2017-08-24 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. Herald added a subscriber: xazax.hun. This diff attempts to fix modeling of arithmetic expressions where pointers are treated as integers (i.e. via C-style / reinterpret casts). In particular, it resolves https://bugs.llvm.org/show_bug.cgi?id=34309 Test plan: make

[PATCH] D136224: [clang-tidy] Skip private default ctors in modernize-use-equals-default

2022-10-18 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: gribozavr2, alexfh, rsmith. alexander-shaposhnikov created this object with visibility "All Users". Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. alexander-shaposhnikov requested

[PATCH] D136224: [clang-tidy] Skip private default ctors in modernize-use-equals-default

2022-10-19 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 469063. alexander-shaposhnikov added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136224/new/ https://reviews.llvm.org/D136224 Files: clang-tools-extra/clang-tidy/

[PATCH] D136224: [clang-tidy] Skip private default ctors in modernize-use-equals-default

2022-10-19 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 469086. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136224/new/ https://reviews.llvm.org/D136224 Files: clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp clang-tools-extra/doc

[PATCH] D136224: [clang-tidy] Skip private default ctors in modernize-use-equals-default

2022-10-19 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 469093. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136224/new/ https://reviews.llvm.org/D136224 Files: clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp clang-tools-extra/doc

[PATCH] D136224: [clang-tidy] Skip private default ctors in modernize-use-equals-default

2022-10-20 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG90d42b1cab04: [clang-tidy] Skip private default ctors in modernize-use-equals-default (authored by alexander-shaposhnikov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D136399: [clang-tidy][modernize-use-equals-default] Avoid adding unnecessary semicolon

2022-10-20 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: gribozavr2, ymandel, alexfh, LegalizeAdulthood. alexander-shaposhnikov created this object with visibility "All Users". Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. alexander-s

[PATCH] D136399: [clang-tidy][modernize-use-equals-default] Avoid adding unnecessary semicolon

2022-10-21 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6c07bda7a75c: [clang-tidy] Avoid adding unnecessary semicolon in modernize-use-equals-default (authored by alexander-shaposhnikov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D136797: [clang-tidy] Skip template ctors in modernize-use-equals-default

2022-10-26 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov created this revision. alexander-shaposhnikov added reviewers: gribozavr2, ymandel, LegalizeAdulthood, alexfh. alexander-shaposhnikov created this object with visibility "All Users". Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. alexander-s

[PATCH] D136797: [clang-tidy] Skip template ctors in modernize-use-equals-default

2022-10-27 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 471304. alexander-shaposhnikov added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136797/new/ https://reviews.llvm.org/D136797 Files: clang-tools-extra/clang-tidy/

[PATCH] D136797: [clang-tidy] Skip template ctors in modernize-use-equals-default

2022-10-27 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov marked 3 inline comments as done. alexander-shaposhnikov added inline comments. Comment at: clang-tools-extra/clang-tidy/modernize/UseEqualsDefaultCheck.cpp:249 unless(isVariadic()), parameterCountIs(0), +unless(hasP

[PATCH] D136797: [clang-tidy] Skip template ctors in modernize-use-equals-default

2022-10-27 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov updated this revision to Diff 471309. alexander-shaposhnikov marked an inline comment as done. alexander-shaposhnikov added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136797/new/ https://reviews

[PATCH] D136797: [clang-tidy] Skip template ctors in modernize-use-equals-default

2022-10-27 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG29e4606ced72: [clang-tidy] Skip template ctors in modernize-use-equals-default (authored by alexander-shaposhnikov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

  1   2   3   4   >