[PATCH] D132003: [clang][ARM][NFC] Clean up signed conversion and undefined macros in builtin header

2022-09-08 Thread Dominic Chen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGac77b3fde120: [clang][ARM][NFC] Clean up signed conversion and undefined macros in builtin… (authored by ddcc). Repository: rG LLVM Github Monorep

[PATCH] D132003: [clang][ARM][NFC] Clean up signed conversion and undefined macros in builtin header

2022-09-07 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. Yup, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132003/new/ https://reviews.llvm.org/D132003 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D132003: [clang][ARM][NFC] Clean up signed conversion and undefined macros in builtin header

2022-09-07 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 458581. ddcc marked an inline comment as done. ddcc added a comment. Fix typo in __revsh Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132003/new/ https://reviews.llvm.org/D132003 Files: clang/lib/Headers/arm_a

[PATCH] D132003: [clang][ARM][NFC] Clean up signed conversion and undefined macros in builtin header

2022-08-16 Thread Dominic Chen via Phabricator via cfe-commits
ddcc created this revision. ddcc added reviewers: tmatheson, javed.absar, SjoerdMeijer. Herald added a subscriber: kristof.beyls. Herald added a project: All. ddcc requested review of this revision. Herald added a project: clang. These warnings were identified while debugging modules with Wsystem-

[PATCH] D131213: [clang][Headers] Fix unintentional error in D130800

2022-08-05 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. I missed line 19, yeah that makes sense. @iana is that ok with you? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131213/new/ https://reviews.llvm.org/D131213 ___ cfe-commits mailin

[PATCH] D131213: [clang][Headers] Fix unintentional error in D130800

2022-08-04 Thread Dominic Chen via Phabricator via cfe-commits
ddcc created this revision. ddcc added reviewers: aaron.ballman, iana. Herald added a project: All. ddcc requested review of this revision. Herald added a project: clang. Undefined macros evaluate to zero, so when checking for a smaller value, we need to include the case when the macro is undefine

[PATCH] D130800: [clang][Headers] Avoid compiler warnings in builtin headers

2022-08-03 Thread Dominic Chen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGbbf19005714b: [clang][Headers] Avoid compiler warnings in builtin headers (authored by ddcc). Changed prior to commit: https://reviews.llvm.org/D1

[PATCH] D130800: [clang][Headers] Avoid compiler warnings in builtin headers

2022-08-02 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added inline comments. Comment at: clang/lib/Headers/stdint.h:99-100 typedef __UINT64_TYPE__ uint64_t; +# undef __int_least64_t # define __int_least64_t int64_t +# undef __uint_least64_t iana wrote: > iana wrote: > > What are you seeing that's defining `__

[PATCH] D130800: [clang][Headers] Avoid compiler warnings in builtin headers

2022-08-02 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 449458. ddcc added a comment. Drop changes to CUDA/HIP/OpenMP headers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130800/new/ https://reviews.llvm.org/D130800 Files: clang/lib/Headers/float.h clang/lib/Head

[PATCH] D130800: [clang][Headers] Avoid compiler warnings in builtin headers

2022-08-02 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added inline comments. Comment at: clang/lib/Headers/__clang_hip_cmath.h:381 // decltype is only available in C++11 and above. -#if __cplusplus >= 201103L +#if defined(__cplusplus) && __cplusplus >= 201103L // __hip_promote tra wrote: > HIP headers are als

[PATCH] D130800: [clang][Headers] Avoid compiler warnings in builtin headers

2022-08-02 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 449403. ddcc added a comment. Error out on undef __cplusplus in CUDA headers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130800/new/ https://reviews.llvm.org/D130800 Files: clang/lib/Headers/__clang_cuda_buil

[PATCH] D130800: [clang][Headers] Avoid compiler warnings in builtin headers

2022-08-02 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added inline comments. Comment at: clang/lib/Headers/__clang_cuda_builtin_vars.h:37 -#if __cplusplus >= 201103L +#if defined(__cplusplus) && __cplusplus >= 201103L #define __DELETE =delete tra wrote: > Are there actual use cases where CUDA headers are use

[PATCH] D130800: [clang][Headers] Avoid compiler warnings in builtin headers

2022-08-01 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 449118. ddcc added a comment. Undef macros instead, handle other header files Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130800/new/ https://reviews.llvm.org/D130800 Files: clang/lib/Headers/__clang_cuda_bui

[PATCH] D130800: [clang][Headers] Avoid compiler warnings in builtin headers

2022-07-29 Thread Dominic Chen via Phabricator via cfe-commits
ddcc created this revision. ddcc added reviewers: efriedma, rnk, aaron.ballman. Herald added a project: All. ddcc requested review of this revision. Herald added a project: clang. While debugging module support using -Wsystem-headers, we discovered that if -Werror, and -Wundef or -Wmacro-redefined

[PATCH] D88349: Fix inconsistent flag for disabling Dead Virtual Function Elimination

2020-10-07 Thread Dominic Chen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc10248829357: Add test for disabling Dead Virtual Function Elimination (authored by ddcc). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D88349: Fix inconsistent flag for disabling Dead Virtual Function Elimination

2020-10-07 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. Hmm, looks like this was already fixed by e5158b52730d323bb8cd2cba6dc6c89b90cba452 . I guess I'll just commit the test then? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D88349: Fix inconsistent flag for disabling Dead Virtual Function Elimination

2020-10-07 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 296826. ddcc added a comment. Update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88349/new/ https://reviews.llvm.org/D88349 Files: clang/test/CodeGenCXX/virtual-function-elimination.cpp Index: clang/t

[PATCH] D88349: Fix inconsistent flag for disabling Dead Virtual Function Elimination

2020-10-07 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 296782. ddcc added a comment. Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88349/new/ https://reviews.llvm.org/D88349 Files: clang/include/clang/Driver/Options.td clang/test/CodeGenCXX/virtual-funct

[PATCH] D88349: Fix inconsistent flag for disabling Dead Virtual Function Elimination

2020-10-05 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88349/new/ https://reviews.llvm.org/D88349 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[PATCH] D88349: Fix inconsistent flag for disabling Dead Virtual Function Elimination

2020-09-25 Thread Dominic Chen via Phabricator via cfe-commits
ddcc created this revision. ddcc added a reviewer: ostannard. Herald added a subscriber: dang. Herald added a project: clang. ddcc requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D88349 Files: clang/include/clang/Driver/Options.td Index: clan

[PATCH] D77704: [gold] Add support for loading pass plugins

2020-05-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. ping, any feedback? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77704/new/ https://reviews.llvm.org/D77704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D77704: [gold] Add support for loading pass plugins

2020-04-24 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In order to reload the gold plugin, I'm modifying the Clang driver to pass in our own path as a separate argument, which is the most generic approach. Another method would be to use e.g. `dladdr()` to grab our own path from one of our exported functions, but that method ap

[PATCH] D77704: [gold] Add support for loading pass plugins

2020-04-24 Thread Dominic Chen via Phabricator via cfe-commits
ddcc marked an inline comment as done. ddcc added a comment. Thanks, seems to be working now for statically-built passes on a default LLVM build without `LLVM_LINK_LLVM_DYLIB`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77704/new/ https://revie

[PATCH] D77704: [gold] Add support for loading pass plugins

2020-04-24 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 259981. ddcc added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Support statically-built passes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77704/new/ https://reviews.llvm.or

[PATCH] D77705: [Driver] Forward pass plugin arguments to gold

2020-04-08 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. Originally, I tried forwarding the `-Xclang -load` arguments, but couldn't access the `options::OPT_plugin` arguments from the argument list. I'm not familiar with tablegen and argument processing, there was some issue with the group not being available causing the argumen

[PATCH] D77705: [Driver] Forward pass plugin arguments to gold

2020-04-07 Thread Dominic Chen via Phabricator via cfe-commits
ddcc created this revision. ddcc added a reviewer: tejohnson. Herald added a project: clang. Support forwarding `-fplugin` and `-fpass-plugin` arguments for loading pass plugins Depends on: D77704 Repository: rG LLVM Github Monorepo https://reviews.llvm.org

[PATCH] D28955: [analyzer] Enable support for symbolic extension/truncation

2020-01-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. I don't have the time to rebase and retest this currently, so it might be better for someone else to take over this patch. Unfortunately, it's been long enough that I don't remember the details of these changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D28955/

[PATCH] D54978: Move the SMT API to LLVM

2019-03-23 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In D54978#1433646 , @mikhail.ramalho wrote: > To fix that, I changed the script slightly: we first try to dinamically get > the Z3's version, if we fail and we are cross compiling, then we try to parse > the headers. Right now, it

[PATCH] D54978: Move the SMT API to LLVM

2019-03-18 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added inline comments. Comment at: llvm/cmake/modules/FindZ3.cmake:92 + + set(Z3_VERSION_STRING ${Z3_MAJOR}.${Z3_MINOR}.${Z3_MAJOR}) + unset(z3_version_str) Should be ${Z3_MAJOR}.${Z3_MINOR}.${Z3_BUILD_NUMBER} CHANGES SINCE LAST ACTION https://reviews.

[PATCH] D54978: Move the SMT API to LLVM

2019-03-16 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In D54978#1431935 , @delcypher wrote: > Would one of you be able to file a bug against Z3 to fix this? I am no longer > in a position to contribute to Z3 so I can't do this. I've opened https://github.com/Z3Prover/z3/issues/2184 .

[PATCH] D54978: Move the SMT API to LLVM

2019-03-16 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In D54978#1431430 , @mikhail.ramalho wrote: > 2. Instead of parsing `Z3_FULL_VERSION`, we can parse `Z3_MAJOR_VERSION`, > `Z3_MINOR_VERSION` and `Z3_BUILD_NUMBER` which are also available in the same > header. Sounds like this mi

[PATCH] D54978: Move the SMT API to LLVM

2019-03-15 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. The only relevant commit that I can find is https://github.com/Z3Prover/z3/commit/2cb4223979cc94e2ebc4e49a9e83adbdcd2b6979 , but it first landed in z3 4.6.0. It looks like it's specific to CMake though, so is it different if you use the python build? I haven't tried the CM

[PATCH] D54978: Move the SMT API to LLVM

2019-03-15 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In D54978#1431430 , @mikhail.ramalho wrote: > Sorry for the massive delay, but I just updated the `FindZ3` script to > retrieve the version from the lib. I changed it to use `try_run` instead of > `try_compile` so we can get the ve

[PATCH] D54978: Move the SMT API to LLVM

2019-02-13 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In D54978#1397316 , @mikhail.ramalho wrote: > I just sent the first prototype of the solution. All the magic happens inside > the `CHECK_CXX_SOURCE_RUNS` call. I think hardcoding the version into the binary is too brittle. Instead

[PATCH] D54978: Move the SMT API to LLVM

2019-02-13 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In D54978#1396403 , @brzycki wrote: > That is almost exactly what I was thinking about this morning. I'd prefer the > following since it's more robust for older versions: The old `version.h` header isn't externally exposed, only th

[PATCH] D54978: Move the SMT API to LLVM

2019-02-12 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In D54978#1395425 , @brzycki wrote: > This works for everything I could throw at it. If you think it's reasonable I > can open another ticket and have the code reviewed as a separate fix. Sounds good to me, although I think it'd be

[PATCH] D54978: Move the SMT API to LLVM

2019-02-12 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In D54978#1395268 , @brzycki wrote: > I think I found why others are struggling to recreate this issue. I did not > have the package `z3/bionic` installed. This provides the `/usr/bin/z3` > executable which `llvm/cmake/modules/FindZ

[PATCH] D54978: Move the SMT API to LLVM

2019-02-11 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added subscribers: delcypher, ddcc. ddcc added a comment. The likely reason for this versioning problem is that the current versioning implementation in FindZ3.cmake is best-effort only: among other conditions, if the z3 binary is available, it will execute it and parse out the version numb

[PATCH] D47726: [Analyzer][Z3] Test fixes for Z3 constraint manager

2018-06-04 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. > @ddcc To be completely honest, I see a few design issues with the current > implementation of Z3 backend, > the main one being that it checks satisfiability after every single exploded > node. > To the best of my knowledge, reasonable scalability would not be achieved

[PATCH] D47726: [Analyzer][Z3] Test fixes for Z3 constraint manager

2018-06-04 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a subscriber: dcoughlin. ddcc added a comment. In https://reviews.llvm.org/D47726#1121395, @george.karpenkov wrote: > - Do all tests for Z3 run when LLVM is configured to use Z3? I'm not sure if > that's the right thing: do all tests start to take 10x time to run once Z3 is > enabled

[PATCH] D47617: [Analyzer] Fix Z3ConstraintManager crash (PR37646)

2018-06-01 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In https://reviews.llvm.org/D47617#1119257, @george.karpenkov wrote: > LGTM with a nit on a test name. Same. In https://reviews.llvm.org/D47617#1119268, @NoQ wrote: > Also does this test need to be z3-specific? We would also not like to crash > here without z3. I had

[PATCH] D47603: [analyzer] fix bug with 1-bit APSInt types in Z3ConstraintManager

2018-05-31 Thread Dominic Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL333704: [analyzer] fix bug with 1-bit APSInt types in Z3ConstraintManager (authored by ddcc, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47603

[PATCH] D47603: [analyzer] fix bug with 1-bit APSInt types in Z3ConstraintManager

2018-05-31 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 149356. ddcc added a comment. Add test, address comments Repository: rC Clang https://reviews.llvm.org/D47603 Files: lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp test/Analysis/apsint.c Index: test/Analysis/apsint.c ==

[PATCH] D47603: [analyzer] fix bug with 1-bit APSInt types in Z3ConstraintManager

2018-05-31 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In https://reviews.llvm.org/D47603#1118138, @vlad.tsyrklevich wrote: > In https://reviews.llvm.org/D47603#1118106, @george.karpenkov wrote: > > > Would it be possible to add tests? I know we have very few unit tests, but > > I assume you could actually use an integration te

[PATCH] D47603: [analyzer] fix bug with 1-bit APSInt types in Z3ConstraintManager

2018-05-31 Thread Dominic Chen via Phabricator via cfe-commits
ddcc created this revision. ddcc added reviewers: george.karpenkov, NoQ. Herald added subscribers: a.sidorin, szepet, xazax.hun. Clang does not have a corresponding QualType for a 1-bit APSInt, so use the BoolTy and extend the APSInt. Split from https://reviews.llvm.org/D35450. Repository: rC

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2018-05-30 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In https://reviews.llvm.org/D35450#1116535, @george.karpenkov wrote: > @ddcc Hi, are you still interested in landing the fixes associated with this > patch? I can take a look as I'm currently reviewing > https://reviews.llvm.org/D45517, but it is likely that the patch woul

[PATCH] D45517: [analyzer] WIP: False positive refutation with Z3

2018-05-26 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. FYI the fix for the 1-bit APSInt issue is in https://reviews.llvm.org/D35450#change-ifYnQ3IlVso https://reviews.llvm.org/D45517 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/list

[PATCH] D28955: [analyzer] Enable support for symbolic extension/truncation

2017-09-01 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. @NoQ Does the proposal in https://reviews.llvm.org/D28955#652465 satisfy your concern? https://reviews.llvm.org/D28955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D28955: [analyzer] Enable support for symbolic extension/truncation

2017-09-01 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. @dcoughlin No, all three patches are separate. I have been testing them with each applied incrementally onto the previous, with the order trunk, https://reviews.llvm.org/D35450, https://reviews.llvm.org/D28954, then https://reviews.llvm.org/D28955 (this). But since these a

[PATCH] D28955: [analyzer] Enable support for symbolic extension/truncation

2017-09-01 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 113619. ddcc added a comment. Rebase, factor out floating-point changes, fix Z3 type bug, support general APSInt comparison https://reviews.llvm.org/D28955 Files: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h include/clang/StaticAnal

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-08-31 Thread Dominic Chen via Phabricator via cfe-commits
ddcc marked 5 inline comments as done. ddcc added a comment. All testcases pass, except the issue with `range_casts.c`. The cause is still the range intersection discussed in https://reviews.llvm.org/D35450#810469. https://reviews.llvm.org/D35450 _

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-08-31 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 113505. ddcc added a comment. Rebase, make complexity limits configurable https://reviews.llvm.org/D35450 Files: include/clang/AST/Expr.h include/clang/Config/config.h.cmake include/clang/StaticAnalyzer/Checkers/SValExplainer.h include/clang/StaticAnal

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-08-28 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added inline comments. Comment at: lib/StaticAnalyzer/Core/SValBuilder.cpp:364 if (symLHS && symRHS && - (symLHS->computeComplexity() + symRHS->computeComplexity()) < MaxComp) + (symLHS->computeComplexity() + symRHS->computeComplexity()) < MaxComp) return

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-08-25 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added inline comments. Comment at: lib/StaticAnalyzer/Core/SValBuilder.cpp:364 if (symLHS && symRHS && - (symLHS->computeComplexity() + symRHS->computeComplexity()) < MaxComp) + (symLHS->computeComplexity() + symRHS->computeComplexity()) < MaxComp) return

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-08-05 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. @NoQ ping https://reviews.llvm.org/D35450 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-07-19 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. As an aside, I think it'd be good to land https://reviews.llvm.org/D28954 and https://reviews.llvm.org/D28955 first, since they affect accuracy and precision of various analyzer parts that this depends on. > Here are some examples that should all be UNKNOWN (right?) but ar

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-18 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 107190. ddcc added a comment. Minor style fix https://reviews.llvm.org/D35450 Files: include/clang/AST/Expr.h include/clang/Config/config.h.cmake include/clang/StaticAnalyzer/Checkers/SValExplainer.h include/clang/StaticAnalyzer/Core/PathSensitive/Cons

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. As an update, after fixing the typo and updating the tests, the assertion in `range_casts.c` is no longer triggered and everything seems fine now. https://reviews.llvm.org/D35450 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 106896. ddcc added a comment. Fix tests after typo fix https://reviews.llvm.org/D35450 Files: include/clang/AST/Expr.h include/clang/Config/config.h.cmake include/clang/StaticAnalyzer/Checkers/SValExplainer.h include/clang/StaticAnalyzer/Core/PathSensi

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. > Is diff 1 the original diff from https://reviews.llvm.org/D28953? It was ok > to reopen it, but the new revision is also fine. No, diff 1 is already different; it contains most of the bugfixes. I couldn't find any way to reopen the previous review, and `arc diff` wouldn'

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 106883. ddcc added a comment. Fix typo https://reviews.llvm.org/D35450 Files: include/clang/AST/Expr.h include/clang/Config/config.h.cmake include/clang/StaticAnalyzer/Checkers/SValExplainer.h include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintM

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-15 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. Compared with https://reviews.llvm.org/D28953, this revision fixes the test failure with `PR3991.m` with RangeConstraintManager, and a few other failures with Z3ConstraintManager. However, there's one remaining test failure in `range_casts.c` that I'm not sure how to resol

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-15 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 106758. ddcc added a comment. Modify Z3RangeConstraintManager::fixAPSInt() and add Expr::isCommutativeOp() https://reviews.llvm.org/D35450 Files: include/clang/AST/Expr.h include/clang/Config/config.h.cmake include/clang/StaticAnalyzer/Checkers/SValExpla

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-14 Thread Dominic Chen via Phabricator via cfe-commits
ddcc created this revision. Generate more IntSymExpr constraints, perform SVal simplification for IntSymExpr and SymbolCast constraints, and create fully symbolic SymExprs https://reviews.llvm.org/D35450 Files: include/clang/Config/config.h.cmake include/clang/StaticAnalyzer/Checkers/SValE

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-12 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. Reverted in https://reviews.llvm.org/rL307853 Repository: rL LLVM https://reviews.llvm.org/D28953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-12 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. Reverted in https://reviews.llvm.org/rL307853 Repository: rL LLVM https://reviews.llvm.org/D28953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-12 Thread Dominic Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL307833: [analyzer] Support generating and reasoning over more symbolic constraint types (authored by ddcc). Changed prior to commit: https://reviews.llvm.org/D28953?vs=106084&id=106284#toc Repository:

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-11 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 106084. ddcc added a comment. Split plist-macros.cpp, and update analyzer_test.py to support tests that require not z3 https://reviews.llvm.org/D28953 Files: include/clang/StaticAnalyzer/Checkers/SValExplainer.h lib/StaticAnalyzer/Core/SValBuilder.cpp l

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-10 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. I've also uploaded the results to https://dcddcc.com/csa https://reviews.llvm.org/D28953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-10 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. I tested the following software, both before and after applying this patch, using RangeConstraintManager. Software, Version, Compile Time (before), Bugs Reported (before), Compile Time (after), Bugs Reported (after) openssl, 1.1.0f, 11 min, 126, 12 min, 126 sqlite, 3.18.2,

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-10 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 105913. ddcc marked an inline comment as done. ddcc added a comment. Drop duplicate code https://reviews.llvm.org/D28953 Files: include/clang/StaticAnalyzer/Checkers/SValExplainer.h lib/StaticAnalyzer/Core/SValBuilder.cpp lib/StaticAnalyzer/Core/SimpleSV

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-07-05 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. ping https://reviews.llvm.org/D28953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-06-20 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. I forgot to mention that the only remaining test failure is on `plist-macros.cpp`; there is a `Assuming condition is true` path note that only appears with the RangeConstraintManager but not with Z3ConstraintManager, and I can't `#ifdef` it because the annotations are chec

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-06-20 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 103239. ddcc added a comment. Rebase, decrease simplification complexity https://reviews.llvm.org/D28953 Files: include/clang/StaticAnalyzer/Checkers/SValExplainer.h lib/StaticAnalyzer/Core/SValBuilder.cpp lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-06-20 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. > Can we drop computing these for some expressions that we know the > RangeConstraintManager will not utilize? It's possible, though I'm not sure what the actual limitations of the RangeConstraintManager are, since there are a lot of intermediate steps that attempt to tra

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-06-15 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added inline comments. Comment at: lib/StaticAnalyzer/Core/SValBuilder.cpp:356 QualType ResultTy) { - if (!State->isTainted(RHS) && !State->isTainted(LHS)) -return UnknownVal(); zaks.anna wrote: > I am concerned that

[PATCH] D33308: [analyzer]: Improve test handling with multiple constraint managers

2017-06-15 Thread Dominic Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305480: [analyzer]: Improve test handling with multiple constraint managers (authored by ddcc). Changed prior to commit: https://reviews.llvm.org/D33308?vs=99394&id=102682#toc Repository: rL LLVM ht

[PATCH] D33308: [analyzer]: Improve test handling with multiple constraint managers

2017-06-10 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. @dcoughlin @zaks.anna @NoQ @xazax.hun Ping, I'd appreciate it if I could get a review for this (https://reviews.llvm.org/D33308), https://reviews.llvm.org/D28955, https://reviews.llvm.org/D28953, and https://reviews.llvm.org/D28954. Rebasing and fixing up these commits is

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-05-18 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 99522. ddcc added a comment. Herald added a subscriber: eraman. Rebase, avoid generating floating-point constraints if unsupported by constraint manager https://reviews.llvm.org/D28954 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td include/clang

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-05-18 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 99521. ddcc added a comment. Fix typo in SymbolCast simplification https://reviews.llvm.org/D28953 Files: include/clang/StaticAnalyzer/Checkers/SValExplainer.h lib/StaticAnalyzer/Core/SValBuilder.cpp lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp lib/St

[PATCH] D33308: [analyzer]: Improve test handling with multiple constraint managers

2017-05-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc created this revision. Modify the test infrastructure to properly handle tests that require z3, and merge together the output of all tests on success. This is required for https://reviews.llvm.org/D28954. https://reviews.llvm.org/D33308 Files: test/Analysis/analyzer_test.py Index: te

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-05-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. I've updated this revision to account for the recent SVal simplification commit by @NoQ, but now there is an exponential recursion problem that prevents testcase `PR24184.cpp` from terminating, due to an interaction between `Simplifier::VisitNonLocSymbolVal()` and `SValBui

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-05-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 99392. ddcc added a comment. Address SVal simplification from https://reviews.llvm.org/D31886 https://reviews.llvm.org/D28953 Files: include/clang/StaticAnalyzer/Checkers/SValExplainer.h lib/StaticAnalyzer/Core/SValBuilder.cpp lib/StaticAnalyzer/Core/Sim

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-05-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In https://reviews.llvm.org/D28952#757375, @iris wrote: > Thank you for helping me build clang with z3.I have already applied the above > updating.But now I have another question, when running clang with '-Xanalyzer > -analyzer-constraints=z3' there is always be a fatal er

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-05-14 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In https://reviews.llvm.org/D28954#754478, @lirhea wrote: > In https://reviews.llvm.org/D28954#714936, @ddcc wrote: > > > Rebase, update tests, fix bugs > > > Excuse me,I want to download full codes of this version,but I have no idea > how to do it,can you tell me? > And m

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-05-10 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 98545. ddcc added a comment. Rebase https://reviews.llvm.org/D28953 Files: include/clang/StaticAnalyzer/Checkers/SValExplainer.h lib/StaticAnalyzer/Core/SValBuilder.cpp lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp test/Analysis/bitwise-ops.c test/An

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-05-10 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. It's been a while since I looked at the code, but I don't believe that all of the new constraints are necessarily unsupported by the current range constraint manager. Rather, they were just not being generated by the SimpleSValBuilder. The changes pass the testsuite for bo

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-05-10 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. In https://reviews.llvm.org/D28952#750558, @iris wrote: > How can I make z3constraintmanager.cpp work in the command line?Or how to > make z3 work? You'll need a bleeding-edge build of Clang/LLVM, since this isn't available in any stable release yet. First, build or inst

[PATCH] D28955: [analyzer] Enable support for symbolic extension/truncation

2017-05-05 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. @dcoughlin : ping https://reviews.llvm.org/D28955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31756: [cmake] Support Gentoo install for z3

2017-04-06 Thread Dominic Chen via Phabricator via cfe-commits
ddcc accepted this revision. ddcc added a comment. This revision is now accepted and ready to land. Thanks! Repository: rL LLVM https://reviews.llvm.org/D31756 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-04-04 Thread Dominic Chen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299463: [analyzer] Add new Z3 constraint manager backend (authored by ddcc). Changed prior to commit: https://reviews.llvm.org/D28952?vs=93974&id=94107#toc Repository: rL LLVM https://reviews.llvm.o

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-04-03 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 93974. ddcc added a comment. Fix support for 128-bit APInt creation, drop pkg-config from CMake module https://reviews.llvm.org/D28952 Files: CMakeLists.txt cmake/modules/FindZ3.cmake include/clang/Config/config.h.cmake include/clang/StaticAnalyzer/Cor

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-03-31 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added inline comments. Comment at: cmake/modules/FindZ3.cmake:3 +# in the find_path() and find_library() calls +find_package(PkgConfig QUIET) +PKG_CHECK_MODULES(PC_Z3 QUIET libz3) delcypher wrote: > @ddcc Seeing as you don't want to use the new upstream Z3 C

[PATCH] D28955: [analyzer] Enable support for symbolic extension/truncation

2017-03-30 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 93591. ddcc added a comment. Rebase https://reviews.llvm.org/D28955 Files: include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h lib/StaticAnalyzer/Checkers/BoolAssignmentChecker

[PATCH] D28954: [analyzer] Add support for symbolic float expressions

2017-03-30 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 93590. ddcc added a comment. Rebase, update tests, fix bugs https://reviews.llvm.org/D28954 Files: include/clang/StaticAnalyzer/Checkers/Checkers.td include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h include/clang/StaticAnalyzer/Core/Pat

[PATCH] D28953: [analyzer] Eliminate analyzer limitations on symbolic constraint generation

2017-03-30 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 93589. ddcc added a comment. Rebase https://reviews.llvm.org/D28953 Files: include/clang/StaticAnalyzer/Checkers/SValExplainer.h lib/StaticAnalyzer/Core/SValBuilder.cpp lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp test/Analysis/bitwise-ops.c test/An

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-03-30 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 93588. ddcc added a comment. Fix erroneous comment https://reviews.llvm.org/D28952 Files: CMakeLists.txt cmake/modules/FindZ3.cmake include/clang/Config/config.h.cmake include/clang/StaticAnalyzer/Core/Analyses.def include/clang/StaticAnalyzer/Core/P

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-03-30 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 93587. ddcc marked 4 inline comments as done. ddcc added a comment. Use direct bitcasting instead of string conversion for APFloat casting, add reference counting for Z3_sort, eliminate some duplicate code https://reviews.llvm.org/D28952 Files: CMakeLists.t

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-03-30 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. Thanks for the feedback! My main constraint is that the results from the floating-point analysis weren't very interesting (see #652894 <#652894>), so I'm not actively working on further development. > FYI I've been working on floating point support in KLEE and have extende

[PATCH] D28952: [analyzer] Add new Z3 constraint manager backend

2017-03-21 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added inline comments. Comment at: lib/StaticAnalyzer/Core/Z3ConstraintManager.cpp:60 +// Set timeout to 15000ms = 15s +Z3_set_param_value(Config, "timeout", "15000"); + } xazax.hun wrote: > Sorry for being a bit late in the party, I was wondering w

  1   2   >