[PATCH] D116155: [clang][AST][ASTImporter] Set record to complete during import of its members.

2022-02-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 407860. balazske added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116155/new/ https://reviews.llvm.org/D116155 Files: clang/lib/AST/ASTImporter.cpp clang/unittests/AST/ASTImporterTes

[PATCH] D116155: [clang][AST][ASTImporter] Set record to complete during import of its members.

2022-02-13 Thread Balázs Kéri 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 rG83028ad934d6: [clang][AST][ASTImporter] Set record to complete during import of its members. (authored by balazske). Repo

[PATCH] D118370: [clang-tidy] bugprone-signal-handler: Message improvement and code refactoring.

2022-02-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118370/new/ https://reviews.llvm.org/D118370 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-04-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:328 const LangOptions &LangOpts) const { - // FIXME: Make the checker useful on C++ code. - if (LangOpts.CPlusPlus) -return false; - - return true; + return LangO

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-04-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 425753. balazske added a comment. Applied the review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118996/new/ https://reviews.llvm.org/D118996 Files: clang-tools-extra/clang-tidy/bugprone/SignalH

[PATCH] D124774: [clang][ASTImporter][NFC]: Address a fixme in ASTImporterSharedState.h

2022-05-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The `ASTImporterLookupTable` was not dependent on the `ImportError` so the header should not be included in that file. It is better in **ASTImporterSharedState.h**. Alternative solution is to add class `ASTImportError` into **ASTImporterSharedState.h** (no new header i

[PATCH] D124774: [clang][ASTImporter][NFC]: Address a fixme in ASTImporterSharedState.h

2022-05-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. A better title: "Move clang::ImportError into own header and rename it (NFC)." Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124774/new/ https://reviews.llvm.org/D124774 ___ cfe

[PATCH] D124774: [clang][ASTImporter][NFC]: Move clang::ImportError into own header and rename it .

2022-05-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/include/clang/AST/ASTImportError.h:17 + +#include "clang/AST/APValue.h" +#include "llvm/Support/Error.h" This header is probably not needed. Comment at: clang/include/clang/AST/ASTImportError.h:

[PATCH] D124774: [clang][ASTImporter][NFC]: Move clang::ImportError into own header and rename it .

2022-05-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/include/clang/AST/ASTImportError.h:1 +//===- ASTImporter.h - Import Error while Importing AST ---*- C++ -*-===// +// balazske wrote: > Comment at: clang/include/clang/AST/ASTImportError.h:

[PATCH] D124774: [clang][ASTImporter][NFC]: Move clang::ImportError into own header.

2022-05-05 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. It looks mostly good now, apart from the line 1 comment problem. Usually in a review all phabricator diffs are created against the original commit or at least against an existing (in the current github repository) commit, here the last diff seems to be against an other

[PATCH] D124774: [clang][ASTImporter][NFC]: Move clang::ImportError into own header.

2022-05-05 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The code looks correct but the diff is not OK. I think that you have separate commits for every change (instead of changing the first with `git commit --amend` when a new change is made). In this case `arc diff --update main` may work (if you have a separate branch fo

[PATCH] D129353: [clang-tidy] Improve check cert-dcl58-cpp.

2022-07-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 443609. balazske marked 2 inline comments as done. balazske added a comment. address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129353/new/ https://reviews.llvm.org/D129353 Files: clang-t

[PATCH] D129353: [clang-tidy] Improve check cert-dcl58-cpp.

2022-07-13 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 444165. balazske marked 3 inline comments as done. balazske added a comment. Added comments, removed unneeded AST matcher code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129353/new/ https://reviews.llvm.or

[PATCH] D129640: [clang][ASTImporter] Improved handling of functions with auto return type.

2022-07-13 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: steakhal, martong, gamesh411, Szelethus, dkrupp. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: All. balazske requested review of this revision. Herald added a project: clang. Herald added a subs

[PATCH] D129353: [clang-tidy] Improve check cert-dcl58-cpp.

2022-07-14 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0e95921bc303: [clang-tidy] Improve check cert-dcl58-cpp. (authored by balazske). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129353/new/ https://reviews.l

[PATCH] D130091: [clang][analyzer] Added partial wide character support to CStringChecker

2022-07-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: Szelethus. Herald added a reviewer: NoQ. Herald added a project:

[PATCH] D129640: [clang][ASTImporter] Improved handling of functions with auto return type.

2022-07-20 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 446057. balazske marked 3 inline comments as done. balazske added a comment. Small code NFC improvements. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129640/new/ https://reviews.llvm.org/D129640 Files: cl

[PATCH] D129640: [clang][ASTImporter] Improved handling of functions with auto return type.

2022-07-20 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:3269-3273 +// Note: It is possible that T can be get as both a RecordType and a +// TemplateSpecializationType. + } + if (const auto *TST = T->getAs()) { +return llvm::count_if(TST->template_a

[PATCH] D130091: [clang][analyzer] Added partial wide character support to CStringChecker

2022-07-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 446385. balazske added a comment. Fix in overlap check, replaced test file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130091/new/ https://reviews.llvm.org/D130091 Files: clang/docs/analyzer/checkers.rst

[PATCH] D130091: [clang][analyzer] Added partial wide character support to CStringChecker

2022-07-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I did not found the existing tests in other files, now all tests for the "non-wide" functions are copied for the "wide" functions. I do not like fully this solution but a single test file with macros for wide and non-wide case is probably not better. Repository: rG

[PATCH] D130091: [clang][analyzer] Added partial wide character support to CStringChecker

2022-07-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/test/Analysis/wstring.c:385 + wchar_t a[32]; + // FIXME: This should work with 'w_str' instead of 'w_str1' + const wchar_t w_str1[] = L"Hello world"; The problem may be that the global constant is not encounter

[PATCH] D130091: [clang][analyzer] Added partial wide character support to CStringChecker

2022-07-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/test/Analysis/wstring.c:385 + wchar_t a[32]; + // FIXME: This should work with 'w_str' instead of 'w_str1' + const wchar_t w_str1[] = L"Hello world"; martong wrote: > balazske wrote: > > The problem may be that

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-07-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118996/new/ https://reviews.llvm.org/D118996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D130091: [clang][analyzer] Added partial wide character support to CStringChecker

2022-07-25 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG94ca2beccc59: [clang][analyzer] Added partial wide character support to CStringChecker (authored by balazske). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D129640: [clang][ASTImporter] Improved handling of functions with auto return type.

2022-07-25 Thread Balázs Kéri 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 rGacd80a29ae7d: [clang][ASTImporter] Improved handling of functions with auto return type. (authored by balazske). Repository: rG LLVM Github Monore

[PATCH] D130470: [clang][analyzer] Add more wide-character functions to CStringChecker

2022-07-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: Szelethus. Herald added a reviewer: NoQ. Herald added a project:

[PATCH] D125340: [clang][NFC][AST] rename the ImportError to ASTImportError

2022-05-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Initially the `ImportError` was very related to `ASTImporter` but now the class is used at other less related places and files. `ImportError` is a too generic name for this unless it can be used at any other "import" in clang which is not the case (the class can be ext

[PATCH] D125340: [clang][NFC][AST] rename the ImportError to ASTImportError

2022-05-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I found one other place in **LibASTImporter.rst** where `ImportError` is used. LLDB should be checked too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125340/new/ https://reviews.llvm.org/D125340 __

[PATCH] D125362: [NFC][analyzer] Transitive interestingness in BugReporter

2022-05-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Is it problem if `markNotInteresting` is used on a symbol that was marked interesting and has subregions? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125362/new/ https://reviews.llvm.org/D125362 ___

[PATCH] D125400: [clang][Analyzer] Add errno state to standard functions modeling.

2022-05-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: steakhal, manas, ASDenysPetrov, martong, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: Szelethus. Herald added a project: All. balazske requested revie

[PATCH] D125340: [clang][NFC][AST] rename the ImportError to ASTImportError

2022-05-12 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. LLDB should be at least compilable after the change. If it has an internal `ImportError` we must not change it. If it uses the renamed class we should rename it, or make an "using" alias and no rename (but not this is the best solution). Repository: rG LLVM Github

[PATCH] D125400: [clang][Analyzer] Add errno state to standard functions modeling.

2022-05-12 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Function `mkdir` is modeled incorrectly by the checker. According to the man page it can return 0 or -1 only (-1 is error) but the checker allows non-negative value at success. So the shown bug report is incorrect (it can be only -1 if not 0 and then check of `errno` i

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-05-13 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 429205. balazske marked 8 inline comments as done. balazske added a comment. Using one isa statement for all class names. Changed the documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118996/new/ ht

[PATCH] D118996: [clang-tidy] Support C++14 in bugprone-signal-handler.

2022-05-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/SignalHandlerCheck.cpp:285 + return isa(S) || isa(S) || + isa(S) || isa(S) || + isa(S) || isa(S) || whisperity wrote: > Is CUDA built upon C++-specific features? It

[PATCH] D125400: [clang][Analyzer] Add errno state to standard functions modeling.

2022-05-16 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. @martong Do you mean that a "describe" function is needed for the return value constraint of the function and for the errno constraint type? Then a note tag can contain what the function is assumed to return on success and what is allowed (or not) to do with `errno`. F

[PATCH] D125986: [clang][ASTImporter] Add support for import of UsingPackDecl.

2022-05-19 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: steakhal, martong, gamesh411, Szelethus, dkrupp. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: All. balazske requested review of this revision. Herald added a project: clang. Herald added a subs

[PATCH] D125986: [clang][ASTImporter] Add support for import of UsingPackDecl.

2022-05-20 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a reviewer: martong. balazske added inline comments. Herald added a subscriber: rnkovacs. Comment at: clang/lib/AST/ASTImporter.cpp:4861 + ToUsingPack->setLexicalDeclContext(LexicalDC); + LexicalDC->addDeclInternal(ToUsingPack); + martong wrote:

[PATCH] D125986: [clang][ASTImporter] Add support for import of UsingPackDecl.

2022-05-20 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 430990. balazske added a comment. Use of addDeclToContexts, added new test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125986/new/ https://reviews.llvm.org/D125986 Files: clang/lib/AST/ASTImporter.cpp

[PATCH] D125400: [clang][Analyzer] Add errno state to standard functions modeling.

2022-05-24 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 431652. balazske added a comment. added comments. added note tag, added test, improved the code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125400/new/ https://reviews.llvm.org/D125400 Files: clang/lib/St

[PATCH] D66336: [ASTImporter] Add development internals docs

2019-08-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/docs/InternalsManual.rst:1569 +positive in-equivalencies otherwise. We must not allow having two (or more) +independent redeclaration chains of structurally equivalent declarations. + It can be mentioned that the

[PATCH] D62131: [ASTImporter] Remove NonEquivalentDecls from ASTImporter

2019-08-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Example about how to get wrong things into `NonEquivalentDecls`: We want to compare `class C` for structural equivalence in the following codes: class A {}; class B {int i;}; void x(A *); void y(A *); class C { friend void x(A *); friend void y(A *); }; and class

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-08-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a project: clang. The structural equivalence check stores now pairs of nodes in the 'from' and 'to' context instead of only the node in 'from' context

[PATCH] D62131: [ASTImporter] Remove NonEquivalentDecls from ASTImporter

2019-08-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. A "quick fix" for the problem: https://reviews.llvm.org/D66538 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62131/new/ https://reviews.llvm.org/D62131 ___ cfe-commits mailing

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-08-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/lib/AST/ASTStructuralEquivalence.cpp:1586 - if (EquivToD1) -return EquivToD1 == D2->getCanonicalDecl(); It looks like that the original code is correct in the deci

[PATCH] D60465: [ASTImporter] Error handling fix in ImportDefinition_New.

2019-08-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske abandoned this revision. balazske added a comment. This change is obsolete in the current code. Casting related changes do not look important (and should be a new patch anyway). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60465/new/ https://reviews.ll

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-08-22 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/unittests/AST/StructuralEquivalenceTest.cpp:1323 +NonEquivalentDecls.end()); + EXPECT_EQ(NonEquivalentDecls.find(std::make_pair(y1, y2)), +NonEquivalentDecls.end(

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-08-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. In D66538#1641310 , @martong wrote: > > It looks like that the original code is correct in the decision of > > structural equivalence of the original pair. If we have an (A,B) and (A,C) > > to compare, B and C are in different d

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-08-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The structural equivalency check works (with this patch) the following way: To check a `(A1,A2)` pair we collect further `(X1,X2)` pairs that should be checked and put these in `DeclsToCheck` (if not already there). The check succeeds if every pair is equivalent. The p

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-08-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 216851. balazske added a comment. - Updated tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66538/new/ https://reviews.llvm.org/D66538 Files: clang/include/clang/AST/ASTStructuralEquivalence.h clang/

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-08-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. In D66538#1642883 , @martong wrote: > There is a third test which could be useful to test whether there is no > faulty cache entries there: > > +TEST_F(StructuralEquivalenceCacheTest, DISABLED_NonEq) { > ... > +} > This i

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-08-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 2 inline comments as done. balazske added a comment. I remember that we had "problems" with nonsense ODR warnings where both declarations are the same. Probably the reason for it was this cache problem. Still the `NonEquivalentDecls` as cache is useful to filter out the non-equi

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-08-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 217105. balazske added a comment. - Small update to newer C++ syntax, use std::pair in test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66538/new/ https://reviews.llvm.org/D66538 Files: clang/include/cla

[PATCH] D66866: [ASTImporter] At import of records re-order indirect fields too.

2019-08-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. Correct order of fields and indirect fields in imported RecordD

[PATCH] D66933: [ASTImporter] Propagate errors during import of overridden methods.

2019-08-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a project: clang. If importing overridden methods fails for a method it can be se

[PATCH] D66866: [ASTImporter] At import of records re-order indirect fields too.

2019-08-29 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 217816. balazske added a comment. - Simplified field matcher in tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66866/new/ https://reviews.llvm.org/D66866 Files: clang/lib/AST/ASTImporter.cpp clang/u

[PATCH] D66933: [ASTImporter] Propagate errors during import of overridden methods.

2019-08-30 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 218039. balazske added a comment. - Renamed ImportOverrides, additional check in test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66933/new/ https://reviews.llvm.org/D66933 Files: clang/lib/AST/ASTImport

[PATCH] D66933: [ASTImporter] Propagate errors during import of overridden methods.

2019-08-30 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370457: [ASTImporter] Propagate errors during import of overridden methods. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to c

[PATCH] D66866: [ASTImporter] At import of records re-order indirect fields too.

2019-09-02 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370621: [ASTImporter] At import of records re-order indirect fields too. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to comm

[PATCH] D64480: [ASTImporter] Added visibility context check for TypedefNameDecl.

2019-09-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 218310. balazske added a comment. Improved the tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64480/new/ https://reviews.llvm.org/D64480 Files: clang/lib/AST/ASTImporter.cpp clang/unittests/AST/ASTI

[PATCH] D64480: [ASTImporter] Added visibility context check for TypedefNameDecl.

2019-09-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 218311. balazske added a comment. - Removed unneeded structs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64480/new/ https://reviews.llvm.org/D64480 Files: clang/lib/AST/ASTImporter.cpp clang/unittests/

[PATCH] D64480: [ASTImporter] Added visibility context check for TypedefNameDecl.

2019-09-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 3 inline comments as done. balazske added a comment. In D64480#1653629 , @shafik wrote: > It is worth noting that: > > typedef int T; > typedef int T; > > > is not valid C99 see godbolt Should we handle

[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.

2019-09-02 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370639: [AST] AST structural equivalence to work internally with pairs. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commi

[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/unittests/AST/ASTImporterODRStrategiesTest.cpp:1 +//===- unittest/AST/ASTImporterTest.cpp - AST node import test ===// +// Change the file name here? Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D64480: [ASTImporter] Added visibility context check for TypedefNameDecl.

2019-09-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 218610. balazske added a comment. - Added comment about repeated enums in C99. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64480/new/ https://reviews.llvm.org/D64480 Files: clang/lib/AST/ASTImporter.cpp

[PATCH] D64480: [ASTImporter] Added visibility context check for TypedefNameDecl.

2019-09-04 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370903: [ASTImporter] Added visibility context check for TypedefNameDecl. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to com

[PATCH] D67174: Rename of constants in ASTImporterVisibilityTest. NFC.

2019-09-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp. Herald added a reviewer: martong. Herald added a reviewer: a.sidorin. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D67174 Files: clang/unittests

[PATCH] D64480: [ASTImporter] Added visibility context check for TypedefNameDecl.

2019-09-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Rename of constants: https://reviews.llvm.org/D67174 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64480/new/ https://reviews.llvm.org/D64480 ___ cfe-commits mailing list cfe-commits@lists.ll

[PATCH] D67174: Rename of constants in ASTImporterVisibilityTest. NFC.

2019-09-05 Thread Balázs Kéri via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL371021: Rename of constants in ASTImporterVisibilityTest. NFC. (authored by balazske, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: http

[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/unittests/AST/ASTImporterODRStrategiesTest.cpp:36 + static constexpr auto *Definition = "void X(int a) {}"; + static constexpr auto *ConflictingDefinition = "void X(double a) {}"; + BindableMatcher getPattern() { --

[PATCH] D66951: [ASTImporter] Add comprehensive tests for ODR violation handling strategies

2019-09-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. OK Probably the `ClassTemplateSpec` can not be handled in liberal way because the AST data structure for template specializations do not allow multiple instances with same argument values? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D71510: [clang][checkers] Added new checker 'error-return-checker'. (WIP)

2020-01-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 236070. balazske added a comment. - Implemented all (now possible) functions. - Moved ParmVal value to own state map. - Improved state data and bug reporting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71510

[PATCH] D71510: [clang][checkers] Added new checker 'error-return-checker'. (WIP)

2020-01-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Works relatively good now but not perfect. The tests are sometimes too strict so there are some false positives, for example this case: unsigned long X = strtoul("345", NULL, 10); if (X > 100) { // handle error } The result is not checked for `ULONG_MAX` but s

[PATCH] D71018: [ASTImporter] Improved import of TypeSourceInfo (TypeLoc)

2020-01-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:8043 + + Error VisitFunctionTypeLoc(FunctionTypeLoc From) { +auto To = ToL.castAs(); martong wrote: > a_sidorin wrote: > > Does this import interacts well with type loc import partiall

[PATCH] D71510: [clang][checkers] Added new checker 'error-return-checker'. (WIP)

2020-01-06 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 236349. balazske added a comment. - Added variadic functions, improved comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71510/new/ https://reviews.llvm.org/D71510 Files: clang/docs/analyzer/checkers.

[PATCH] D71510: [clang][checkers] Added new checker 'error-return-checker'. (WIP)

2020-01-07 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 3 inline comments as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ErrorReturnChecker.cpp:77 +// This should work with any type of null value. +// FIXME: Is this different from the ValueErrorResultChecker with 0 as value? +cla

[PATCH] D71510: [clang][checkers] Added new checker 'error-return-checker'. (WIP)

2020-01-09 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 237053. balazske added a comment. - Prevent warning if call is in a return statement. - Prevent warning if call is casted to void. - Added documentation. - Fixed the tests. - Some other fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71510: [clang][checkers] Added new checker 'error-return-checker'.

2020-01-09 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 237061. balazske added a comment. - More fixes in test files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71510/new/ https://reviews.llvm.org/D71510 Files: clang/docs/analyzer/checkers.rst clang/include

[PATCH] D71510: [clang][checkers] Added new checker 'error-return-checker'.

2020-01-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a reviewer: NoQ. balazske added a comment. Checker was tested with tmux, no problems found (there are false positives but not easy to fix). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71510/new/ https://reviews.llvm.org/D71510

[PATCH] D71510: [clang][checkers] Added new checker 'error-return-checker'.

2020-01-13 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 237680. balazske added a comment. - Improved function list format in documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71510/new/ https://reviews.llvm.org/D71510 Files: clang/docs/analyzer/checke

[PATCH] D71510: [clang][checkers] Added new checker 'error-return-checker'.

2020-01-14 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The checker was implemented in smaller parts that are visible in the commit list. I can split the patch at the commits (and figure out how to use git history manipulations and phabricator in a better way?). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D71510: [clang][checkers] Added new checker 'error-return-checker'.

2020-01-14 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I wanted to implement the rules described here: https://wiki.sei.cmu.edu/confluence/display/c/ERR33-C.+Detect+and+handle+standard+library+errors This lists the functions to check so this knowledge has to be built into the checker and there are examples of this in other c

[PATCH] D72705: [clang][checkers] Added new checker 'alpha.unix.ErrorReturn'.

2020-01-14 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, mgorny. Herald added a project: clang. First simple implementation, infrastructure is ready. Only one kind of check (NULL error return value) is implemented. Documentation not added yet. Idea of th

[PATCH] D71510: [clang][checkers] Added new checker 'error-return-checker'.

2020-01-14 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Smaller diff with first part: https://reviews.llvm.org/D72705 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71510/new/ https://reviews.llvm.org/D71510 ___ cfe-commits mailing

[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C.

2020-09-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 291158. balazske added a comment. - Code formatting fixes. - Updated description. - Improved CalledFunctionsCollector. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87449/new/ https://reviews.llvm.org/D87449

[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C.

2020-09-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 4 inline comments as done. balazske added a comment. It looks like that the `clang-tidy/add_new_check.py` script does not work correctly, at least it "corrupts" the **list.rst** file, and creates files with no newline at end. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C.

2020-09-11 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 291238. balazske added a comment. Added entry to release notes and fixed wrong comment in test headers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87449/new/ https://reviews.llvm.org/D87449 Files: clang-

[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C.

2020-09-14 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 291524. balazske added a comment. Changed checker messages, reformatted text, rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87449/new/ https://reviews.llvm.org/D87449 Files: clang-tools-extra/clang-

[PATCH] D72705: [analyzer] Added new checker 'alpha.unix.ErrorReturn'.

2020-09-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I am not sure if this checker is worth to further development. A part of the found bugs can be detected with other checkers too, specially if the preconditions of many standard functions are checked (more than what is done now) and by modeling the function calls with a

[PATCH] D79432: [analyzer] StdLibraryFunctionsChecker: Add summaries for libc

2020-09-15 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:1123-1124 + "abs", Summary(ArgTypes{IntTy}, RetType{IntTy}, EvalCallAsPure) + .Case({ArgumentCondition(0, WithinRange, SingleValue(0)), +

[PATCH] D88140: [clang-tidy] Check for sigaction in cert-sig30-c.

2020-09-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, martong, gamesh411, Szelethus, dkrupp, xazax.hun, whisperity. Herald added a project: clang. balazske requested review of this revision. The checker recognizes handlers assigned to members of a "struct sigaction" variable. If

[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C.

2020-09-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87449/new/ https://reviews.llvm.org/D87449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D88312: "ErrorReturn checker" WIP review

2020-09-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, martong, Charusso, gamesh411, Szelethus, dkrupp. Herald added a reviewer: Szelethus. Herald added a project: clang. balazske requested review of this revision. This is a testing version for the checker that is implemented in D

[PATCH] D72705: [analyzer] Added new checker 'alpha.unix.ErrorReturn'.

2020-09-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. A improved version of the checker is added for further discussion (or should continue here?) and to show the improved checker code. See D88312 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D88312: "ErrorReturn checker" WIP review

2020-09-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Here are the results with this checker o

[PATCH] D88312: "ErrorReturn checker" WIP review

2020-09-28 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. Results for 'duckdb': link Repository:

[PATCH] D71510: [clang][checkers] Added new checker 'error-return-checker'.

2020-08-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske planned changes to this revision. balazske added a comment. Herald added subscribers: martong, Charusso. This patch is here for code reference only. Although the whole checker does not work safe in this way the idea behind this approach can be useful. Repository: rG LLVM Github Monor

[PATCH] D75045: [analyzer] Improved check of `fgetc` in StreamChecker.

2020-08-18 Thread Balázs Kéri via Phabricator via cfe-commits
balazske planned changes to this revision. balazske added a comment. Herald added subscribers: ASDenysPetrov, whisperity. Something like this can be added to StreamChecker but it has changed in many places so a new review would be needed. The main problem is with this `fgetc` check is that it wo

[PATCH] D84415: [analyzer][StdLibraryFunctionsChecker] Add POSIX pthread handling functions

2020-08-25 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:882 + const QualType SizePtrTy = getPointerTy(SizeTy); + const QualType SizePtrRestrictTy = getRestrictTy(SizePtrTy); martong wrote: > balazske wrote:

[PATCH] D86531: [analyzer][StdLibraryFunctionsChecker][NFC] Use Optionals throughout the summary API

2020-08-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:851 + } getPointerTy(ACtx); + class { + public: Why has this class different layout than `GetPointerTy` and `GetRestrictTy` (beneath that here is no `

[PATCH] D72705: [analyzer] Added new checker 'alpha.unix.ErrorReturn'.

2020-08-27 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. The summary of this last discussion is that it is not acceptable to have only the simple check for the explicit comparison with a fixed constant. At least not for return types where the "implicit" check (a check that is always true or false for the error return value)

<    2   3   4   5   6   7   8   9   10   11   >