balazske added a comment.
Ping
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60499/new/
https://reviews.llvm.org/D60499
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
This revision was automatically updated to reflect the committed changes.
Closed by commit rL365464: [ASTImporter] Added visibility context check for
EnumDecl. (authored by balazske, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
CHAN
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.
These tests may work with language constructs in C++11 in the future.
To avoid warnings about la
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.
balazske added a parent revision: D64477: [ASTImporter] Using La
balazske created this revision.
Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp.
Herald added a reviewer: martong.
Herald added a reviewer: shafik.
Herald added a project: clang.
A new function will be added to get the original SourceLocation
for a SourceLocation that was impor
balazske updated this revision to Diff 200901.
balazske added a comment.
Rebase to current master.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60465/new/
https://reviews.llvm.org/D60465
Files:
lib/AST/ASTImporter.cpp
Index: lib/AST/ASTImporter.cpp
balazske added a comment.
ping
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60465/new/
https://reviews.llvm.org/D60465
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
balazske added a comment.
Maybe this patch can be abandoned, the correction is already made (when every
_New was removed).
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60465/new/
https://reviews.llvm.org/D60465
___
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.
ASTImporter makes now difference between classes with same name
balazske marked an inline comment as done.
balazske added a comment.
Thanks for reviewing.
Similar additions are planned to follow with function and variable template,
enum, scoped enum, typedef, type alias.
Comment at: unittests/AST/ASTImporterVisibilityTest.cpp:34
};
+stru
balazske updated this revision to Diff 201133.
balazske added a comment.
- Changed type of string constants to const.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62312/new/
https://reviews.llvm.org/D62312
Files:
lib/AST/ASTImporter.cpp
unittests/AST/ASTImp
This revision was automatically updated to reflect the committed changes.
Closed by commit rL361752: [ASTImporter] Added visibility context check for
CXXRecordDecl. (authored by balazske, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
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.
ASTImporter makes now difference between enums with same name i
balazske updated this revision to Diff 201521.
balazske added a comment.
- Import BraceRange of EnumDecl.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60499/new/
https://reviews.llvm.org/D60499
Files:
lib/AST/ASTImporter.cpp
Index: lib/AST/ASTImporter.cpp
==
balazske added a comment.
There is a test for the SourceLocation import in
https://reviews.llvm.org/D60463 (after this patch is applied that test should
not fail and the "return" statement is to be removed).
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60499/ne
balazske marked 3 inline comments as done.
balazske added inline comments.
Comment at: lib/AST/ASTImporter.cpp:6129
if (Error Err =
-ImportTemplateArgumentListInfo(E->template_arguments(), ToTAInfo))
+ImportTemplateArgumentListInfo(E->getLAngleLoc(),
E->
balazske updated this revision to Diff 179249.
balazske added a comment.
Rebase.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D53818/new/
https://reviews.llvm.org/D53818
Files:
include/clang/AST/ASTImporter.h
lib/AST/ASTImporter.cpp
Index: lib/AST/ASTImport
balazske created this revision.
Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp.
Herald added a project: clang.
The checker now recognizes 'freopen' as file opening function.
Added support for binding the return value to the passed stream.
Repository:
rG LLVM Github Monorep
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.
ASTImporter makes now difference between function templates wit
balazske added a comment.
Code of StreamChecker does not look much better, it uses deprecated
`eval::Call` and does not check for escape. But it handles more functions and
error at open (still not `freopen`). A mixture of both would be a better option.
Repository:
rG LLVM Github Monorepo
CH
This revision was automatically updated to reflect the committed changes.
Closed by commit rL371820: [Clang][ASTImporter] Added visibility check for
FunctionTemplateDecl. (authored by balazske, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Changed prior to
balazske created this revision.
Herald added subscribers: cfe-commits, teemperor, gamesh411, Szelethus, dkrupp.
Herald added a reviewer: martong.
Herald added a reviewer: a.sidorin.
Herald added a reviewer: shafik.
Herald added a project: clang.
ASTImporter makes now difference between class templ
balazske created this revision.
Herald added subscribers: cfe-commits, gamesh411, Szelethus, dexonsmith,
steven_wu, dkrupp, xazax.hun, inglorion, mgorny, mehdi_amini.
Herald added a project: clang.
Added new checker 'cert-default-operator-new' that checks for
CERT rule MEM57-CPP. Simple version.
balazske added inline comments.
Comment at: clang/unittests/AST/ASTImporterODRStrategiesTest.cpp:274
+// There may be a hidden fwd spec decl before a function spec decl.
+if (auto *PrevF = dyn_cast(ImportedD)) {
+ if (PrevF->getTemplatedKind() ==
Thi
balazske marked 3 inline comments as done.
balazske added a comment.
C++17 makes things more difficult because the align is probably handled by
`operator new`, probably not, depending on the defined allocation functions.
This can be observed only with a non clang-tidy checker (we could compute t
balazske marked an inline comment as done.
balazske added inline comments.
Comment at: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp:53
+CheckFactories.registerCheck(
+"cert-default-operator-new");
CheckFactories.registerCheck(
The checker
balazske marked an inline comment as done.
balazske added inline comments.
Comment at: clang-tools-extra/clang-tidy/cert/DefaultOperatorNewCheck.cpp:49
+ if (HasDefaultOperatorNew && OverAligned)
+diag(NewExpr->getBeginLoc(), "using default 'operator new' with
over-aligned
balazske marked an inline comment as done.
balazske added inline comments.
Comment at: clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp:53
+CheckFactories.registerCheck(
+"cert-default-operator-new");
CheckFactories.registerCheck(
aaron.ballm
balazske updated this revision to Diff 220625.
balazske added a comment.
Rebase and update according to comments.
C++17 related changes not implemented yet (possible check for the called
allocation function).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llv
balazske updated this revision to Diff 220628.
balazske added a comment.
Fixed the test, fixed problems in list.rst.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67545/new/
https://reviews.llvm.org/D67545
Files:
clang-tools-extra/clang-tidy/cer
balazske abandoned this revision.
balazske added a comment.
I try to improve `StreamChecker` instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67480/new/
https://reviews.llvm.org/D67480
___
cfe-co
balazske created this revision.
Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp.
Herald added a project: clang.
Recognization of function names is done now with the CallDescription
class instead of using IdentifierInfo. This means function name and
argument count is compared to
balazske marked an inline comment as done.
balazske added inline comments.
Comment at: clang-tools-extra/clang-tidy/cert/DefaultOperatorNewCheck.cpp:51
+ // The alignment used by default 'operator new' (in bits).
+ const unsigned DefaultAlignment = Context.getTargetInfo().getNe
balazske updated this revision to Diff 222138.
balazske added a comment.
Using CallDescriptionMap.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67706/new/
https://reviews.llvm.org/D67706
Files:
clang/lib/StaticAnalyzer/Checkers/StreamChecker.cp
balazske updated this revision to Diff 222161.
balazske added a comment.
- Rename to DefaultOperatorNewAlignmentCheck.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67545/new/
https://reviews.llvm.org/D67545
Files:
clang-tools-extra/clang-tidy/c
balazske marked an inline comment as done.
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:90-106
+ FnCheck identifyCall(const CallEvent &Call, CheckerContext &C,
+ const CallExpr *CE) const;
+
+ void evalFop
balazske updated this revision to Diff 222566.
balazske added a comment.
- Various code cleanups. Eval functions use CallEvent, CallExpr is removed from
state.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67706/new/
https://reviews.llvm.org/D6770
balazske marked 3 inline comments as done.
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:109-110
bool StreamChecker::evalCall(const CallEvent &Call, CheckerContext &C) const {
+ if (!Call.isGlobalCFunction())
+return false;
balazske marked 2 inline comments as done.
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:109-110
bool StreamChecker::evalCall(const CallEvent &Call, CheckerContext &C) const {
+ if (!Call.isGlobalCFunction())
+return false;
balazske updated this revision to Diff 222795.
balazske marked an inline comment as done.
balazske added a comment.
- Re-design of eval functions.
- Added a C++ test with fopen-looking function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67706/ne
balazske updated this revision to Diff 153015.
balazske added a comment.
Rebase to newest master.
Repository:
rC Clang
https://reviews.llvm.org/D47459
Files:
unittests/AST/ASTImporterTest.cpp
Index: unittests/AST/ASTImporterTest.cpp
balazske created this revision.
Herald added a subscriber: cfe-commits.
Added structural equivalence check for C++ methods.
Improved structural equivalence tests.
Added related ASTImporter tests.
Repository:
rC Clang
https://reviews.llvm.org/D48628
Files:
lib/AST/ASTStructuralEquivalence.c
balazske created this revision.
Herald added subscribers: cfe-commits, martong.
Herald added a reviewer: a.sidorin.
Repository:
rC Clang
https://reviews.llvm.org/D48631
Files:
lib/AST/ASTImporter.cpp
test/ASTMerge/std-initializer-list/Inputs/il.cpp
test/ASTMerge/std-initializer-list/test
balazske added inline comments.
Comment at: lib/AST/ASTStructuralEquivalence.cpp:873
+
+ if (auto *Constructor1 = dyn_cast(Method1)) {
+if (auto *Constructor2 = dyn_cast(Method2)) {
a.sidorin wrote:
> ```if (Method1->getStmtKind() != Method2->getStmtKind())
balazske created this revision.
Herald added subscribers: cfe-commits, martong.
Herald added a reviewer: a.sidorin.
When a Decl is imported over an already existing similar one,
the isUsed flag is updated if it is set in the imported Decl.
This can happen if the Decl is used somewhere in the impor
balazske added a comment.
Originally this change was made after the patch in
https://reviews.llvm.org/D47632 was done. It is here back-ported to the state
before it. I like the idea of integrating this change into
https://reviews.llvm.org/D47632. (This is a new functionality: Attributes are
up
balazske added inline comments.
Comment at: lib/AST/ASTImporter.cpp:2085
}
+ } else {
+if (!IsStructuralMatch(D, FoundRecord, false))
martong wrote:
> a_sidorin wrote:
> > Is it possible to use the added code for the entire condi
balazske updated this revision to Diff 154073.
balazske added a comment.
- Updates according to review comments
Repository:
rC Clang
https://reviews.llvm.org/D48628
Files:
lib/AST/ASTImporter.cpp
lib/AST/ASTStructuralEquivalence.cpp
unittests/AST/ASTImporterTest.cpp
unittests/AST/Str
balazske added inline comments.
Comment at: lib/AST/ASTImporter.cpp:2454
+ if (IsStructuralMatch(D, FoundFunction)) {
+const FunctionDecl *Definition = nullptr;
+if (D->doesThisDeclarationHaveABody() &&
This change with `Definitio
balazske updated this revision to Diff 154175.
balazske added a comment.
- Added comment into test StructuralEquivalenceRecordTest.DISABLED_Methods.
Repository:
rC Clang
https://reviews.llvm.org/D48628
Files:
lib/AST/ASTImporter.cpp
lib/AST/ASTStructuralEquivalence.cpp
unittests/AST/AS
balazske marked an inline comment as done.
balazske added inline comments.
Comment at: unittests/AST/StructuralEquivalenceTest.cpp:489
+
+TEST_F(StructuralEquivalenceRecordTest, DISABLED_Methods) {
+ auto t = makeNamedDecls(
a_sidorin wrote:
> Could you add a co
balazske marked an inline comment as done.
balazske added inline comments.
Comment at: unittests/AST/StructuralEquivalenceTest.cpp:489
+
+TEST_F(StructuralEquivalenceRecordTest, DISABLED_Methods) {
+ auto t = makeNamedDecls(
a_sidorin wrote:
> balazske wrote:
>
balazske added inline comments.
Comment at: lib/AST/ASTImporter.cpp:6905
Decl *ToD = Pos->second;
+// FIXME: remove this call from this function
ASTNodeImporter(*this).ImportDefinitionIfNeeded(FromD, ToD);
I think this comment is not needed (or with
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 rL336776: [AST] Structural equivalence of methods (authored by
balazske, committed by ).
Herald added a subscriber: llvm-com
balazske created this revision.
Herald added a subscriber: cfe-commits.
When checking a class or function the described class or function template
is checked too.
Improved test with symmetric check, added new tests.
Repository:
rC Clang
https://reviews.llvm.org/D49223
Files:
lib/AST/ASTStr
balazske created this revision.
Herald added subscribers: cfe-commits, martong.
Herald added a reviewer: a.sidorin.
When a function is imported, check if it has a described template.
The name lookup is corrected to find the templated entity in this case.
The described template of the function is i
balazske created this revision.
Herald added subscribers: cfe-commits, martong.
Herald added a reviewer: a.sidorin.
Herald added a reviewer: a.sidorin.
When an already existing class is encountered during import,
check if it has implicit methods that are missing in the existing one,
and import the
balazske created this revision.
Herald added subscribers: cfe-commits, martong.
Herald added a reviewer: a.sidorin.
Repository:
rC Clang
https://reviews.llvm.org/D49293
Files:
lib/AST/ASTImporter.cpp
test/Import/inherited-ctor-init-expr/Inputs/A.cpp
test/Import/inherited-ctor-init-expr/t
balazske added inline comments.
Comment at: lib/AST/ASTStructuralEquivalence.cpp:913
- if (D1->isAnonymousStructOrUnion() && D2->isAnonymousStructOrUnion()) {
+ if (!D1->getDeclName() && !D2->getDeclName()) {
// If both anonymous structs/unions are in a record context, m
balazske updated this revision to Diff 155625.
balazske added a comment.
- Small style and comment changes.
Repository:
rC Clang
https://reviews.llvm.org/D49245
Files:
lib/AST/ASTImporter.cpp
unittests/AST/ASTImporterTest.cpp
Index: unittests/AST/ASTImporterTest.cpp
balazske added inline comments.
Comment at: lib/AST/ASTImporter.cpp:6741
+
+ auto *Ctor = dyn_cast(Importer.Import(
+ E->getConstructor()));
a_sidorin wrote:
> cast_or_null?
dyn_cast_or_null: Import may return nullptr, but if not, the cast should
succeed (
balazske added inline comments.
Comment at: lib/AST/ASTImporter.cpp:2715
+if (auto *ToFT = dyn_cast(Importer.Import(FromFT)))
+ ToFunction->setDescribedFunctionTemplate(ToFT);
+else
a_sidorin wrote:
> The function template should be already set after
balazske updated this revision to Diff 155630.
balazske added a comment.
- Removed setDescribedFunctionTemplate call.
Repository:
rC Clang
https://reviews.llvm.org/D49235
Files:
lib/AST/ASTImporter.cpp
unittests/AST/ASTImporterTest.cpp
Index: unittests/AST/ASTImporterTest.cpp
=
This revision was automatically updated to reflect the committed changes.
Closed by commit rC337162: [ASTImporter] Import implicit methods of existing
class. (authored by balazske, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D49245?vs=155625&id=155648#toc
Repository:
rC
balazske added inline comments.
Comment at: unittests/AST/StructuralEquivalenceTest.cpp:615
+ ASSERT_TRUE(R0);
+ ASSERT_TRUE(R1);
+ ASSERT_NE(R0, R1);
These asserts can be removed too.
Repository:
rC Clang
https://reviews.llvm.org/D49296
__
This revision was automatically updated to reflect the committed changes.
Closed by commit rC337260: [ASTImporter] Import described template (if any) of
function. (authored by balazske, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D49235?vs=155630&id=155832#toc
Repository:
balazske updated this revision to Diff 155838.
balazske added a comment.
- Using cast_or_null
Repository:
rC Clang
https://reviews.llvm.org/D49293
Files:
lib/AST/ASTImporter.cpp
test/Import/inherited-ctor-init-expr/Inputs/A.cpp
test/Import/inherited-ctor-init-expr/test.cpp
Index: tes
balazske added a comment.
Ping
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67706/new/
https://reviews.llvm.org/D67706
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cg
balazske marked 3 inline comments as done.
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:288-290
+ SymbolRef Sym = RetVal.getAsSymbol();
+ stateNotNull = stateNotNull->set(Sym, StreamState::getOpened());
+ stateNull = stateNull
balazske updated this revision to Diff 225625.
balazske added a comment.
- Fixes from review comments, added C++ version test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67545/new/
https://reviews.llvm.org/D67545
Files:
clang-tools-extra/clan
balazske added a comment.
Ping
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67543/new/
https://reviews.llvm.org/D67543
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cg
balazske updated this revision to Diff 226206.
balazske added a comment.
- Improved check for C++17.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67545/new/
https://reviews.llvm.org/D67545
Files:
clang-tools-extra/clang-tidy/cert/CERTTidyModule
balazske added a comment.
Ping again
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67706/new/
https://reviews.llvm.org/D67706
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf7c9f77ef372: [Analyzer][StreamChecker] Added support for
'fread' and 'fwrite'. (authored by balazske).
Changed prior to commit:
https://reviews.llvm.org/D80015?vs=264843&id=265159#toc
Repository:
rG
balazske marked 2 inline comments as done.
balazske added a comment.
I want to test the StreamChecker for false positives. Page
http://clang.llvm.org/analyzer/open_projects.html says that it has too much
false positives because state splitting (I did not see this page before.)
There is an alter
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1194
- if (!FD)
+ if (!Call.getOriginExpr())
return;
This should be added to avoid later crash (probably not needed for every check
kind?):
```
const Funct
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1194
- if (!FD)
+ if (!Call.getOriginExpr())
return;
Szelethus wrote:
> Szelethus wrote:
> > balazske wrote:
> > > This should be added to avoid later crash (
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1194
- if (!FD)
+ if (!Call.getOriginExpr())
return;
Szelethus wrote:
> Szelethus wrote:
> > balazske wrote:
> > > Szelethus wrote:
> > > > Szelethus wrote:
>
balazske accepted this revision.
balazske added a comment.
This revision is now accepted and ready to land.
Looks good. Not sure if it work in all cases after the `MallocChecker` problems
but we can fix problems if any later.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77846/new/
htt
balazske marked 4 inline comments as done.
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:107
+ /// This value applies to all error states in ErrorState except FEOF.
+ /// An EOF+indeterminate state is the same as EOF state.
+ b
balazske added inline comments.
Comment at:
clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:435
+ /// If the call returns a C++ record type then the region of its return value
+ // can be retrieved from its construction context.
+ Optional getReturnValueUnde
balazske marked an inline comment as done.
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:107
+ /// This value applies to all error states in ErrorState except FEOF.
+ /// An EOF+indeterminate state is the same as EOF state.
+ b
balazske marked an inline comment as done.
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:857-868
+// FEof and other states are possible.
+// The path with FEof is the one that can continue.
+// For this reason a non-fa
balazske updated this revision to Diff 266434.
balazske added a comment.
- Rebase
- Some StreamState members are const and checked in constructor
- Restructuring of some functions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80018/new/
https://re
balazske updated this revision to Diff 266440.
balazske marked 2 inline comments as done.
balazske added a comment.
- Fixed a bug in previous update
- Added new tests
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80018/new/
https://reviews.llvm.org
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:747
+ : *FilePtrTy)
+: None;
+
martong wrote:
> balazske wrote:
> > The `Optional` can be left out from the right
balazske marked an inline comment as done.
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:670
- State = State->set(StreamSym, StreamState::getOpened(Desc));
+ // FilePositionIndeterminate is not cleared.
+ State = State->set(
balazske added inline comments.
Comment at:
clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:917
assert(isa(sReg) || isa(sReg) ||
isa(sReg) || isa(sReg));
}
This assert should not be duplicated. It has the place in `VarRegion
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9081fa20991d: [Analyzer][StreamChecker] Added check for
"indeterminate file position". (authored by balazske).
Changed prior to commit:
https://reviews.llvm.org/D80018?vs=266440&id=266752#toc
Repositor
balazske created this revision.
Herald added subscribers: cfe-commits, ASDenysPetrov, martong, Charusso,
gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet,
baloghadamsoftware, xazax.hun.
Herald added a reviewer: Szelethus.
Herald added a project: clang.
After an escape
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:112
+Optional ExprEngine::retrieveFromConstructionContext(
+ProgramStateRef State, const LocationContext *LCtx,
baloghadamsoftware wrote:
> baloghadamsoftware wrote:
balazske created this revision.
Herald added subscribers: cfe-commits, ASDenysPetrov, martong, Charusso,
gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet,
baloghadamsoftware, xazax.hun.
Herald added a reviewer: Szelethus.
Herald added a project: clang.
BugType objects
balazske added a comment.
Why is `BuiltinBug` used instead of `BugType`? The differentiation between
these classes looks not obvious. There is even a non-virtual `getDescription`
function in both classes and a confusion with meaning of "name" and
"description".
Repository:
rG LLVM Github Mo
balazske added a comment.
The code looks basically good to me, some documentations can be improved.
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:697
if (auto *FD = dyn_cast(D)) {
- if (S.matchesSignature(FD)) {
+ if (S.
balazske accepted this revision.
balazske added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:739
+ Optional FileTy = lookupType("FILE", ACtx);
+ Optional FilePtrTy, FilePtrRestri
balazske added a comment.
Strange: Even if the assume for zero index size does not indicate problem
(assume that index length is not zero) the `getKnownValue` returns 0 for it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79330/new/
https://revie
balazske added inline comments.
Comment at: clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp:114-115
// Convert the array length to size_t.
NonLoc IndexLength =
SVB.evalCast(SizeD, SizeTy, SizeE->getType()).castAs();
// Multiply the array length by the
balazske added a comment.
It is no problem to return instead of the assert. I could fix the problem by
using
SVal LessThanZeroVal = SVB.evalBinOp(State, BO_LE, SizeD, Zero, SizeTy);
in `checkVLAIndexSize` (`BO_LT` is used before). Still the proposed return
makes the code more safe.
==
balazske accepted this revision.
balazske added a comment.
This revision is now accepted and ready to land.
At least as fast bugfix it is acceptable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80903/new/
https://reviews.llvm.org/D80903
__
balazske created this revision.
Herald added subscribers: cfe-commits, ASDenysPetrov, martong, Charusso,
gamesh411, dkrupp, donat.nagy, Szelethus, arphaman, mikhail.ramalho, a.sidorin,
szepet, baloghadamsoftware, xazax.hun.
Herald added a reviewer: Szelethus.
Herald added a project: clang.
balazs
201 - 300 of 1564 matches
Mail list logo