[PATCH] D65249: [NFC] use C++11 in AlignOf.h, remove AlignedCharArray

2021-02-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Herald added a subscriber: JDevlieghere. Hi @jfb This patch results in a compiler crash when building a simple C program on a Windows X86 Debug build. I have filed this issue to track it. Repository: rG LLVM Github Monorep

[PATCH] D78853: [Analysis] Fix null pointer dereference warnings [1/n]

2020-04-27 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 260517. mgrang retitled this revision from "[Sema] Fix null pointer dereference warnings [1/n]" to "[Analysis] Fix null pointer dereference warnings [1/n]". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78853/new/ https://reviews.llvm.org/D78853 File

[PATCH] D78853: [Sema] Fix null pointer dereference warnings [1/n]

2020-04-27 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D78853#2003866 , @efriedma wrote: > Please don't add null checks for pointers that can't be null. It makes the > code slower and harder to understand. And least one of the checks you added > is actively breaking the code. > >

[PATCH] D78853: [Sema] Fix null pointer dereference warnings [1/n]

2020-04-24 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rsmith, efriedma, rnk, dblaikie. Running the PREfast static analysis tool on clang resulted in several null pointer dereference warnings. This is the first of several patches to fix these. The full list of warnings reported is here: https://d

[PATCH] D66122: [CodeGen] Emit dynamic initializers for static TLS vars in outlined scopes

2019-08-16 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:472 + + llvm::sort(OrderedVarInits.begin(), OrderedVarInits.end(), + [&VarInitDependencies](const VarDecl *a, const VarDecl *b) { You can use the range-based version of llvm::so

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-05-24 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL361664: [Analyzer] Checker for non-determinism caused by iteration of unordered… (authored by mgrang, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior t

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-05-03 Thread Mandeep Singh Grang 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 rC359932: [COFF, ARM64] Fix ABI implementation of struct returns (authored by mgrang, committed by ). Repository: rC Clan

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-05-02 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D60349#1488411 , @efriedma wrote: > LGTM, assuming it passes testing on electron Thanks Eli. @richard.townsend.arm Can you please confirm whether Electron works with this patch and D60348 ? C

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-05-02 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 197831. mgrang edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/C

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-30 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 197436. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDe

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-29 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Thanks @richard.townsend.arm . I have updated the patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-29 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 197158. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDe

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-26 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 196894. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDe

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-25 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 196774. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDe

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-23 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 196342. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDe

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-23 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 196341. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/AST/DeclCXX.h include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDe

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 196144. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDeclCXX.cpp test/CodeGen/arm64

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 196109. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDeclCXX.cpp test/CodeGen/arm64

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 195932. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp lib/Sema/SemaDeclCXX.cpp test/CodeGen/arm64

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-12 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang marked an inline comment as done. mgrang added a comment. In D60349#1462638 , @ostannard wrote: > The document you linked in the LLVM change > (https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=vs-2019#return-values) >

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-12 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 194954. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 Files: include/clang/CodeGen/CGFunctionInfo.h lib/CodeGen/CGCall.cpp lib/CodeGen/MicrosoftCXXABI.cpp test/CodeGen/arm64-microsoft-arguments.cpp I

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Got rid of the confusing SuppressSRet logic. The "inreg" attribute is now used to indicate sret returns in X0. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60349/new/ https://reviews.llvm.org/D60349 ___

[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

2019-04-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, efriedma, TomTan, ssijaric. Herald added subscribers: kristof.beyls, javed.absar. Herald added a project: clang. Related llvm patch: D60348 . Repository: rC Clang https://reviews.llvm.org/D60349 Files

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D59279#1439014 , @Szelethus wrote: > In D59279#1438514 , @mgrang wrote: > > > Although, as you rightly pointed out that //ordered// sets of pointers are > > as non-deterministic as //unor

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-21 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D59279#1438500 , @rnkovacs wrote: > In D59279#1427017 , @mgrang wrote: > > > Following are the assumptions/limitations of this patch: > > > > 1. The assumption is that iteration of order

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-20 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Ping for reviews please. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59279/new/ https://reviews.llvm.org/D59279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I was trying to write another checker for hashing of pointers. Basically, I wanted to match all instances where the keys of std::map are pointers. Writing an AST matcher for std::map is straightforward. However, I am not sure how to check for pointer keys after matching

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-13 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 190472. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59279/new/ https://reviews.llvm.org/D59279 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-13 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. > Could you please add a commit that changes the top of the file on your > previous commit? Feel free to do that without review (I can't commit it > myself atm). Done in https://reviews.llvm.org/rC356086. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59279/new/

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-13 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. > The obvious question, why not implement this in clang-tidy? Going forward I would like to make these non-determinism checks more precise by reasoning about what happens inside the loop, for example. I am not sure if clang-tidy has support for such deeper reasoning. I t

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-13 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Also, what is the difference between these two: https://clang.llvm.org/docs/analyzer/checkers.html, https://clang-analyzer.llvm.org/available_checks.html. It seems they document similar stuff. Should we add the doc for each new checker in both of these? CHANGES SINCE L

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-13 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 190453. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59279/new/ https://reviews.llvm.org/D59279 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-12 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Following are the assumptions/limitations of this patch: 1. The assumption is that iteration of ordered containers of pointers is not non-deterministic. 2. Currently we only detect std::unordered_set. Detection of unordered_map can be added later. 3. Currentl

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-12 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: NoQ, george.karpenkov, whisperity, Szelethus. mgrang added a project: clang. Herald added subscribers: Charusso, jdoerfert, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun, mgorny. Added a check

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-03-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 189905. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-03-08 Thread Mandeep Singh Grang 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 rL355720: [Analyzer] Checker for non-determinism caused by sorting of pointer-like… (authored by mgrang, committed by ). Her

[PATCH] D39050: Add index-while-building support to Clang

2019-03-06 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: lib/Index/FileIndexData.cpp:31 + std::vector Sorted(Decls); + std::sort(Sorted.begin(), Sorted.end()); + return Sorted; Please use range-based llvm::sort instead of std::sort: ``` llvm::sort(Sorted); ``` See https://

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-03-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. @NoQ Ping 2 for reviews please. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[PATCH] D57986: [ProfileData] Sort FuncData before iteration to remove non-determinism

2019-03-01 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL355252: [ProfileData] Sort FuncData before iteration to remove non-determinism (authored by mgrang, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D57986: [ProfileData] Sort FuncData before iteration to remove non-determinism

2019-03-01 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 189002. mgrang added a comment. Addressed comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57986/new/ https://reviews.llvm.org/D57986 Files: lib/ProfileData/InstrProfWriter.cpp Index: lib/ProfileData/InstrProfWriter.cpp ==

[PATCH] D57986: [ProfileData] Sort FuncData before iteration to remove non-determinism

2019-03-01 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 188951. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57986/new/ https://reviews.llvm.org/D57986 Files: lib/ProfileData/InstrProfWriter.cpp Index: lib/ProfileData/InstrProfWriter.cpp

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-03-01 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1409565 , @mgrang wrote: > In D50488#1407975 , @Szelethus wrote: > > > But, as a work-in-progress alpha checker, the direction is set and looks > > great. Please let @NoQ have the

[PATCH] D57986: [ProfileData] Sort FuncData before iteration to remove non-determinism

2019-02-28 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 188843. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57986/new/ https://reviews.llvm.org/D57986 Files: lib/ProfileData/InstrProfWriter.cpp Index: lib/ProfileData/InstrProfWriter.cpp

[PATCH] D57986: [ProfileData] Sort FuncData before iteration to remove non-determinism

2019-02-28 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 188824. mgrang retitled this revision from "[ProfileData] Remove non-determinism: Change DenseMap to MapVector" to "[ProfileData] Sort FuncData before iteration to remove non-determinism". mgrang added a reviewer: dblaikie. Herald added a subscriber: jdoerfert

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-25 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1407975 , @Szelethus wrote: > But, as a work-in-progress alpha checker, the direction is set and looks > great. Please let @NoQ have the final say. Thanks a lot @Szelethus! I will wait for @NoQ 's comments. Repository

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-25 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1407884 , @Szelethus wrote: > In D50488#1405094 , @mgrang wrote: > > > So I was able compile a couple of C++ code bases through csa-testbench. I > > built cppcheck and tinyxml2 wit

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-25 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang marked an inline comment as done. mgrang added inline comments. Comment at: include/clang/StaticAnalyzer/Checkers/Checkers.td:97 +def NonDeterminismAlpha : Package<"nondeterminism">, ParentPackage; + Szelethus wrote: > Hmmm, okay, so your checker ks C++

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-25 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 188232. mgrang set the repository for this revision to rC Clang. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checke

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1407695 , @Charusso wrote: > bitcoin: > > sudo apt-get install build-essential libtool autotools-dev automake > pkg-config libssl-dev libevent-dev bsdmainutils python3 libboost-all-dev > software-properties-common libm

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-22 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1405094 , @mgrang wrote: > So I was able compile a couple of C++ code bases through csa-testbench. I > built cppcheck and tinyxml2 without any problems. cppcheck has one invocation > std::sort but the keys are not pointe

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-20 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. So I was able compile a couple of C++ code bases through csa-testbench. I built cppcheck and tinyxml2 without any problems. cppcheck has one invocation std::sort but the keys are not pointers whereas tinyxml2 does not use std::sort. I tried bitcoin, rtags, xerces but run

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-20 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1403653 , @Szelethus wrote: > In D50488#1403197 , @mgrang wrote: > > > > It's because it invokes CodeChecker, which by default enables > > > valist.Uninitialized, but not ValistBas

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-20 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 187695. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. > There is a revision to solve this problem here: D58065 > . I guess your input, as someone who didn't > participate in the checker dependency related patch reviews would be > invaluable, in terms of whether my description is understandab

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Also I don't see the helptext for PointerSorting when I run: clang -cc1 -analyzer-checker-help | grep Pointer alpha.core.PointerArithmCheck for pointer arithmetic on locations other than array elements alpha.core.PointerSub Check for pointer

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. > It's because it invokes CodeChecker, which by default enables > valist.Uninitialized, but not ValistBase. Do you have assert failures after > my hotfix? @Szelethus Thanks. I run into this assert when run through CodeChecker: Assertion `CheckerTags.count(tag) != 0 &&

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 187466. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 Files: docs/analyzer/checkers.rst include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/

[PATCH] D58065: [analyzer] Document the frontend library

2019-02-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: docs/analyzer/developer-docs/FrontendLibrary.rst:12 +This document will describe the frontend of the Static Analyzer, basically +everything from compiling the analyzer from source, through it's invocation up +to the beginning of the analy

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1400823 , @whisperity wrote: > Yeah, it seems upstream has moved away due to @Szelethus' implementation of a > much more manageable "checker dependency" system. You most likely will have > to rebase your patch first, the

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-19 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 187418. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLists.txt lib/StaticAnalyzer/Checkers/PointerSortingChecke

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-15 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I hacked around the run_experiments.py to set CMAKE_C_FLAGS and now I see the following error in stats.html. Note: I see the same error with an existing checker like PointerArithmChecker. And I do not hit this assert when I run the checker outside of csa-testbench. As

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-15 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. The error I now get is: clang is not able to compile a simple test program. /usr/bin/ld: unrecognised emulation mode: armelf_linux_eabi Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu i386linux elf_l1om elf_k1om i386pep i386pe This is because

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I guess I hadn't sourced the CodeChecker venv correctly. Now that I did source it and started the CodeChecker server I seem to be progressing. The error I get now is compiler related (which I will dig into). 12:51:35 [bitcoin] Checking out project... [ERROR] Unknown

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D50488#1397721 , @xazax.hun wrote: > In D50488#1395483 , @mgrang wrote: > > > Reviving this now that I have some cycles to work on this. > > > > So I tried running this on csa-testbench pr

[PATCH] D57986: [ProfileData] Remove non-determinism: Change DenseMap to MapVector

2019-02-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Ping for reviews please. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57986/new/ https://reviews.llvm.org/D57986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-12 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Reviving this now that I have some cycles to work on this. So I tried running this on csa-testbench projects but I didn't have much success. I always run into a bunch of build/env related errors: 15:05:20 [libcxx] Checking out project... [ERROR] Unknown option: json

[PATCH] D50488: [Analyzer] Checker for non-determinism caused by sorting of pointer-like elements

2019-02-12 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 186549. Herald added subscribers: jdoerfert, baloghadamsoftware. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D50488/new/ https://reviews.llvm.org/D50488 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td lib/StaticAnalyzer/Checkers/CMakeLis

[PATCH] D57986: [ProfileData] Remove non-determinism: Change DenseMap to MapVector

2019-02-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. tools/llvm-profdata/instr-remap.test is failing in the reverse iteration bot. See http://lab.llvm.org:8011/builders/reverse-iteration/builds/10546/steps/check_all/logs/stdio. This is because FunctionData is iterated in InstrProfWriter to output function counts, etc. But

[PATCH] D57986: [ProfileData] Remove non-determinism: Change DenseMap to MapVector

2019-02-08 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rsmith, bogner. Herald added a project: clang. Repository: rC Clang https://reviews.llvm.org/D57986 Files: include/llvm/ProfileData/InstrProfWriter.h Index: include/llvm/ProfileData/InstrProfWriter.h

[PATCH] D53541: [COFF, ARM64] Do not emit x86_seh_recoverfp intrinsic

2019-01-16 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang abandoned this revision. mgrang added a comment. I have added a default lowering for llvm.eh.recoverfp in D53540 . So this patch is no longer needed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53541/new/ https://reviews.llvm.org/D53541

[PATCH] D53541: [COFF, ARM64] Do not emit x86_seh_recoverfp intrinsic

2019-01-15 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I have renamed llvm.x86.seh.recoverfp intrinsic to llvm.eh.recoverfp in D56747 and D56748 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53541/new/ https://reviews.llvm.org/D53541 ___

[PATCH] D56748: [EH] Rename llvm.x86.seh.recoverfp intrinsic to llvm.eh.recoverfp

2019-01-15 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, efriedma. This is the clang counterpart to D56747 . Repository: rC Clang https://reviews.llvm.org/D56748 Files: lib/CodeGen/CGException.cpp test/CodeGen/exceptions-seh.c test/CodeGenCXX/exceptio

[PATCH] D53541: [COFF, ARM64] Do not emit x86_seh_recoverfp intrinsic

2019-01-15 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D53541#1358210 , @rnk wrote: > I can't compile the example you gave yet because I haven't applied your > patches locally, but this is the "three stack pointer" case that I have in > mind: > > struct Foo { > void (*ptr)();

[PATCH] D53541: [COFF, ARM64] Do not emit x86_seh_recoverfp intrinsic

2019-01-15 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D53541#1356904 , @rnk wrote: > In D53541#1353251 , @mgrang wrote: > > > > What about the three stack pointer case of stack realignment plus a > > > dynamic alloca? Typically this is the c

[PATCH] D56685: [COFF, ARM64] Add __byteswap intrinsics

2019-01-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC351147: [COFF, ARM64] Add __byteswap intrinsics (authored by mgrang, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56685/new/ https://reviews.llvm.org/D566

[PATCH] D56685: [COFF, ARM64] Add __byteswap intrinsics

2019-01-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 181679. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56685/new/ https://reviews.llvm.org/D56685 Files: lib/Headers/intrin.h test/Headers/ms-arm64-intrin.cpp Index: test/Headers/ms-arm64-intrin.cpp ===

[PATCH] D56685: [COFF, ARM64] Add __byteswap intrinsics

2019-01-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang marked an inline comment as done. mgrang added a comment. Verified that this compiles when both intrin.h and stdlib.h from the Microsoft SDK are included, in either order. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56685/new/ https://reviews.llvm.org/D56685 ___

[PATCH] D56685: [COFF, ARM64] Add __byteswap intrinsics

2019-01-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 181671. mgrang retitled this revision from "[COFF, ARM64] Declare __byteswap intrinsics" to "[COFF, ARM64] Add __byteswap intrinsics". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56685/new/ https://reviews.llvm.org/D56685 Files: lib/Headers/intri

[PATCH] D56671: [COFF, ARM64] Add __nop intrinsic

2019-01-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL351135: [COFF, ARM64] Add __nop intrinsic (authored by mgrang, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D56671?vs=181578&id=181659#toc

[PATCH] D56620: [COFF, ARM64] Declare intrinsics: __nop, _byteswap_[ushort/ulong/uint64]

2019-01-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang abandoned this revision. mgrang added a comment. _bytswap intrinsics are added in D56685 . Abandoning this patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56620/new/ https://reviews.llvm.org/D56620

[PATCH] D56685: [COFF, ARM64] Declare __byteswap intrinsics

2019-01-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, efriedma, ssijaric, TomTan, haripul. Herald added subscribers: kristof.beyls, javed.absar. Repository: rC Clang https://reviews.llvm.org/D56685 Files: lib/Headers/arm64intr.h test/Headers/ms-arm64-intrin.cpp Index: test/Headers/m

[PATCH] D56671: [COFF, ARM64] Add __nop intrinsic

2019-01-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, efriedma, TomTan, haripul, ssijaric. Herald added subscribers: kristof.beyls, javed.absar. Repository: rC Clang https://reviews.llvm.org/D56671 Files: lib/Headers/intrin.h test/Headers/ms-arm64-intrin.cpp Index: test/Headers/ms-a

[PATCH] D56620: [COFF, ARM64] Declare intrinsics: __nop, _byteswap_[ushort/ulong/uint64]

2019-01-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I have implemented __nop intrinsics in https://reviews.llvm.org/D56620 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56620/new/ https://reviews.llvm.org/D56620 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D56620: [COFF, ARM64] Declare intrinsics: __nop, _byteswap_[short/long/uint64]

2019-01-11 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 181390. mgrang retitled this revision from "[COFF, ARM64] Include stdlib.h in arm64intr.h" to "[COFF, ARM64] Declare intrinsics: __nop, _byteswap_[short/long/uint64]". mgrang edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D56620: [COFF, ARM64] Include stdlib.h in arm64intr.h

2019-01-11 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D56620#1354979 , @efriedma wrote: > Have you verified this matches MSVC? (IIRC the only reason we include > stdlib.h on x86 is so we can define _mm_malloc.) I don't see MSVC intrin.h including stdlib.h. So I guess I will just

[PATCH] D56620: [COFF, ARM64] Include stdlib.h in arm64intr.h

2019-01-11 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, efriedma, ssijaric, TomTan, haripul. Herald added subscribers: kristof.beyls, javed.absar. We mimic x86 behavior which includes stdlib.h in x86intr.h. Repository: rC Clang https://reviews.llvm.org/D56620 Files: lib/Headers/arm64int

[PATCH] D53541: [COFF, ARM64] Do not emit x86_seh_recoverfp intrinsic

2019-01-11 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 181333. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53541/new/ https://reviews.llvm.org/D53541 Files: lib/CodeGen/CGException.cpp test/CodeGen/exceptions-seh.c Index: test/CodeGen/exceptions-seh.c ==

[PATCH] D56463: [SEH] Pass the frame pointer from SEH finally to finally functions

2019-01-11 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: lib/CodeGen/CGException.cpp:1635 +else { + llvm::Value *LocalAddrFn = CGM.getIntrinsic(llvm::Intrinsic::localaddress); + FP = CGF.Builder.CreateCall(LocalAddrFn); 80 char limit. Repository: rC Clang CH

[PATCH] D53541: [COFF, ARM64] Do not emit x86_seh_recoverfp intrinsic

2019-01-10 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D53541#1282900 , @rnk wrote: > In D53541#1282764 , @mgrang wrote: > > > Updated the patch with the following changes: > > > > 1. Emit llvm.x86.seh.recoverfp only for non-aarch64 targets. F

[PATCH] D53541: [COFF, ARM64] Do not emit x86_seh_recoverfp intrinsic

2019-01-10 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 181106. mgrang retitled this revision from "[COFF, ARM64] Support SEH for ARM64 Windows" to "[COFF, ARM64] Do not emit x86_seh_recoverfp intrinsic". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53541/new/ https://reviews.llvm.org/D53541 Files: lib

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-10 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Ping for reviews please. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55229/new/ https://reviews.llvm.org/D55229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang marked an inline comment as done. mgrang added inline comments. Comment at: CodeGenObjC/gnu-init.m:103 +// Make sure we do not have dllimport on the load function +// CHECK-WIN: declare dso_local void @__objc_load I had to remove dllimport in this and th

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-04 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 176693. mgrang retitled this revision from "[COFF, ARM64] Make -flto-visibility-public-std a driver and cc1 flag" to "[COFF] Statically link certain runtime library functions". mgrang edited the summary of this revision. CHANGES SINCE LAST ACTION https://re

[PATCH] D55229: [COFF, ARM64] Make -flto-visibility-public-std a driver and cc1 flag

2018-12-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D55229#1317333 , @rnk wrote: > I think @compnerd arranged things this way. I don't know why > -flto-visibility-public-std is involved, I have no idea what that does. I > think we should do what MSVC does here, which is to leave

[PATCH] D55229: [COFF, ARM64] Make -flto-visibility-public-std a driver and cc1 flag

2018-12-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D55229#1317232 , @pcc wrote: > The reason why it has that name is that it was originally added to support > the logic here: > http://llvm-cs.pcc.me.uk/tools/clang/lib/CodeGen/CGVTables.cpp#991 > > It looks like it was later rep

[PATCH] D55229: [COFF, ARM64] Make -flto-visibility-public-std a driver and cc1 flag

2018-12-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I wonder why this flag is called -flto-visibility-public-std. It has nothing to do with -flto. While we are at it, does it make sense to rename this flag? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55229/new/ https://reviews.llvm.org/D

[PATCH] D55229: [COFF, ARM64] Make -flto-visibility-public-std a driver and cc1 flag

2018-12-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, mstorsjo, efriedma, TomTan. Herald added subscribers: dexonsmith, kristof.beyls, inglorion, javed.absar, mehdi_amini. Clang currently imports certain functions (like __imp__CxxThrowException) even when statically linking. Whereas MSVC st

[PATCH] D54816: [RISCV] Mark unit tests as "requires: riscv-registered-target"

2018-11-27 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL347688: [RISCV] Mark unit tests as "requires: riscv-registered-target" (authored by mgrang, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D54

[PATCH] D54816: [RISCV] Mark unit tests as "requires: riscv-registered-target"

2018-11-27 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. Ping for reviews please. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54816/new/ https://reviews.llvm.org/D54816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/

[PATCH] D54816: [RISCV] Mark unit tests as "requires: riscv-registered-target"

2018-11-21 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: asb, apazos. Herald added subscribers: jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar. Some of these tests break if the RIS

  1   2   3   4   >