Page MenuHomePhabricator
Feed Advanced Search

Yesterday

balazske committed rG1cefe91d40ae: [clang-tidy][docs][NFC] Improve documentation of bugprone-unhandled-exception… (authored by balazske).
[clang-tidy][docs][NFC] Improve documentation of bugprone-unhandled-exception…
Fri, Dec 3, 7:37 AM
balazske closed D114602: [clang-tidy][docs][NFC] Improve documentation of bugprone-unhandled-exception-at-new.
Fri, Dec 3, 7:37 AM · Restricted Project
balazske updated the diff for D114602: [clang-tidy][docs][NFC] Improve documentation of bugprone-unhandled-exception-at-new.

Applied the text changes.

Fri, Dec 3, 7:34 AM · Restricted Project

Wed, Dec 1

balazske added a comment to D114418: [clang][ASTImporter] Update lookup table correctly at deduction guides..

The new tests produce some -Wodr warnings. The reason is that all deduction guides for the same class B are in the ASTImporterLookupTable with the same name "deduction guide for B". The message may come from the import of the function template declaration, when an existing non-matching object is found. This is only a printed message, does not cause failure.

Wed, Dec 1, 8:47 AM · Restricted Project
balazske updated the diff for D114418: [clang][ASTImporter] Update lookup table correctly at deduction guides..

Improved the test.
Added another test to show effect of import in different order.
Updated the comment in ASTImporter.cpp.

Wed, Dec 1, 8:11 AM · Restricted Project

Tue, Nov 30

balazske added inline comments to D113118: [clang][AST] Check context of record in structural equivalence..
Tue, Nov 30, 1:16 AM · Restricted Project

Fri, Nov 26

balazske added inline comments to D114602: [clang-tidy][docs][NFC] Improve documentation of bugprone-unhandled-exception-at-new.
Fri, Nov 26, 7:09 AM · Restricted Project
balazske updated the diff for D114602: [clang-tidy][docs][NFC] Improve documentation of bugprone-unhandled-exception-at-new.

Apply of review comments.

Fri, Nov 26, 7:06 AM · Restricted Project

Thu, Nov 25

balazske committed rG8e8658b19c05: [clang][AST] Check context of record in structural equivalence. (authored by balazske).
[clang][AST] Check context of record in structural equivalence.
Thu, Nov 25, 11:39 PM
balazske closed D113118: [clang][AST] Check context of record in structural equivalence..
Thu, Nov 25, 11:39 PM · Restricted Project
balazske added reviewers for D114602: [clang-tidy][docs][NFC] Improve documentation of bugprone-unhandled-exception-at-new: Eugene.Zelenko, aaron.ballman.
Thu, Nov 25, 8:53 AM · Restricted Project
balazske requested review of D114602: [clang-tidy][docs][NFC] Improve documentation of bugprone-unhandled-exception-at-new.
Thu, Nov 25, 8:37 AM · Restricted Project
balazske added inline comments to D114418: [clang][ASTImporter] Update lookup table correctly at deduction guides..
Thu, Nov 25, 7:19 AM · Restricted Project
balazske added inline comments to D114418: [clang][ASTImporter] Update lookup table correctly at deduction guides..
Thu, Nov 25, 6:05 AM · Restricted Project
balazske updated the diff for D113118: [clang][AST] Check context of record in structural equivalence..

Using correct AST match in the tests to fix failures on Windows.

Thu, Nov 25, 2:55 AM · Restricted Project
balazske reopened D113118: [clang][AST] Check context of record in structural equivalence..

Windows test failures occurred because wrong AST matchers in the tests. Tests will be updated to use named match.

Thu, Nov 25, 2:45 AM · Restricted Project
balazske added a reverting change for rG6b96b2a0bf65: [clang][AST] Check context of record in structural equivalence.: rG8804d08e9921: Revert "[clang][AST] Check context of record in structural equivalence.".
Thu, Nov 25, 12:17 AM
balazske committed rG8804d08e9921: Revert "[clang][AST] Check context of record in structural equivalence." (authored by balazske).
Revert "[clang][AST] Check context of record in structural equivalence."
Thu, Nov 25, 12:17 AM
balazske added a reverting change for D113118: [clang][AST] Check context of record in structural equivalence.: rG8804d08e9921: Revert "[clang][AST] Check context of record in structural equivalence.".
Thu, Nov 25, 12:17 AM · Restricted Project

Wed, Nov 24

balazske committed rG6b96b2a0bf65: [clang][AST] Check context of record in structural equivalence. (authored by balazske).
[clang][AST] Check context of record in structural equivalence.
Wed, Nov 24, 8:20 AM
balazske closed D113118: [clang][AST] Check context of record in structural equivalence..
Wed, Nov 24, 8:20 AM · Restricted Project
balazske added a comment to D114418: [clang][ASTImporter] Update lookup table correctly at deduction guides..

If the test is changed to print AST:

TEST_P(ASTImporterOptionSpecificTestBase, ImportDeductionGuide) {
  TranslationUnitDecl *FromTU = getTuDecl(
      R"(
      template<class> class A { };
      template<class T> class B {
          template<class T1, typename = A<T>> B(T1);
      };
      template<class T>
      B(T, T) -> B<int>;
      )",
      Lang_CXX17);
Wed, Nov 24, 1:06 AM · Restricted Project

Tue, Nov 23

balazske added a reviewer for D114418: [clang][ASTImporter] Update lookup table correctly at deduction guides.: martong.
Tue, Nov 23, 3:44 AM · Restricted Project
balazske requested review of D114418: [clang][ASTImporter] Update lookup table correctly at deduction guides..
Tue, Nov 23, 1:22 AM · Restricted Project
balazske updated the diff for D113118: [clang][AST] Check context of record in structural equivalence..

Applied lint reformattings.

Tue, Nov 23, 1:04 AM · Restricted Project

Tue, Nov 16

balazske added inline comments to D111795: [analyzer] Reject incomplete matches in CallEvent::isCalled(), also introduce wildcards.
Tue, Nov 16, 12:31 AM

Mon, Nov 15

balazske added inline comments to D111795: [analyzer] Reject incomplete matches in CallEvent::isCalled(), also introduce wildcards.
Mon, Nov 15, 8:13 AM
balazske updated the diff for D113118: [clang][AST] Check context of record in structural equivalence..

Updated tests.

Mon, Nov 15, 2:28 AM · Restricted Project
balazske added a comment to D113118: [clang][AST] Check context of record in structural equivalence..

In the last case the the RecordDecl's a and b can be matched (not internal statements in a function) and this is similar to the existing test cases. The struct a and struct b already fails to match because different name.

Mon, Nov 15, 1:43 AM · Restricted Project

Nov 3 2021

balazske added reviewers for D113118: [clang][AST] Check context of record in structural equivalence.: martong, shafik, teemperor, a.sidorin.
Nov 3 2021, 9:33 AM · Restricted Project
balazske requested review of D113118: [clang][AST] Check context of record in structural equivalence..
Nov 3 2021, 8:51 AM · Restricted Project

Nov 2 2021

balazske committed rG4bcbb3d4d7a8: [clang-tidy] Add check 'cert-err33-c'. (authored by balazske).
[clang-tidy] Add check 'cert-err33-c'.
Nov 2 2021, 3:26 AM
balazske closed D112409: [clang-tidy] Add check 'cert-err33-c'..
Nov 2 2021, 3:26 AM · Restricted Project

Oct 29 2021

balazske updated the diff for D112409: [clang-tidy] Add check 'cert-err33-c'..

Using a much smaller test file.

Oct 29 2021, 12:16 AM · Restricted Project

Oct 28 2021

balazske updated the diff for D112409: [clang-tidy] Add check 'cert-err33-c'..

Removed remaining non-alias check line from list.rst.

Oct 28 2021, 8:49 AM · Restricted Project
balazske added a comment to D112409: [clang-tidy] Add check 'cert-err33-c'..

Not sure if it is good to have such a test, the first and last function is enough?

Oct 28 2021, 8:47 AM · Restricted Project
balazske updated the diff for D112409: [clang-tidy] Add check 'cert-err33-c'..

Updated order of code lines, added a test file.

Oct 28 2021, 8:40 AM · Restricted Project

Oct 27 2021

balazske added a comment to D112558: [analyzer] sprintf is a taint propagator not a source.

Probably it is a bit more correct but it can be better to remove the sprintf like functions from taint propagation. These functions return the number of bytes written to buf. This is in some extent dependent on the input parameters but maybe more no than yes. If there are fixed characters in the format string the return value is never zero only if error occurs. (But a more taint-likely case is if the %s format is used.)

Oct 27 2021, 12:13 AM · Restricted Project

Oct 26 2021

balazske added inline comments to D112409: [clang-tidy] Add check 'cert-err33-c'..
Oct 26 2021, 8:13 AM · Restricted Project
balazske updated the diff for D112409: [clang-tidy] Add check 'cert-err33-c'..

Added to release notes, added new links to documentation.

Oct 26 2021, 7:59 AM · Restricted Project
balazske added inline comments to D112409: [clang-tidy] Add check 'cert-err33-c'..
Oct 26 2021, 7:46 AM · Restricted Project
balazske added a comment to D112409: [clang-tidy] Add check 'cert-err33-c'..

I was not sure how the aliasing is to be handled if the check is not exactly the same as the original. (This was a topic on the mailing list.) I like it more if only those checks are aliases that are exactly the same. But for now it will remain as it was before, otherwise this has to be changed for all aliases.

Oct 26 2021, 7:44 AM · Restricted Project
balazske updated the diff for D112409: [clang-tidy] Add check 'cert-err33-c'..

Improved the documentation.
Small code layout changes.

Oct 26 2021, 7:37 AM · Restricted Project

Oct 25 2021

balazske added a comment to D112409: [clang-tidy] Add check 'cert-err33-c'..

This check is likely to generate many warnings on a "random" open-source project because many of these functions are usually not checked. But the rule contains this list and if a project wants to conform this check can be useful.

Oct 25 2021, 9:21 AM · Restricted Project
balazske added a reviewer for D112409: [clang-tidy] Add check 'cert-err33-c'.: Eugene.Zelenko.
Oct 25 2021, 9:19 AM · Restricted Project
balazske requested review of D112409: [clang-tidy] Add check 'cert-err33-c'..
Oct 25 2021, 12:14 AM · Restricted Project

Oct 22 2021

balazske committed rG4ff103c02400: [clang][ASTImporter] Fix for importing functions with EST_Unevaluated prototype. (authored by balazske).
[clang][ASTImporter] Fix for importing functions with EST_Unevaluated prototype.
Oct 22 2021, 12:28 AM
balazske closed D112013: [clang][ASTImporter] Fix for importing functions with EST_Unevaluated prototype..
Oct 22 2021, 12:27 AM · Restricted Project

Oct 20 2021

balazske added inline comments to D112013: [clang][ASTImporter] Fix for importing functions with EST_Unevaluated prototype..
Oct 20 2021, 11:59 PM · Restricted Project
balazske updated the diff for D112013: [clang][ASTImporter] Fix for importing functions with EST_Unevaluated prototype..

Improved test, set of TypeSourceInfo is not needed any more.

Oct 20 2021, 11:54 PM · Restricted Project

Oct 19 2021

balazske added inline comments to D112013: [clang][ASTImporter] Fix for importing functions with EST_Unevaluated prototype..
Oct 19 2021, 9:01 AM · Restricted Project

Oct 18 2021

balazske added a reviewer for D112013: [clang][ASTImporter] Fix for importing functions with EST_Unevaluated prototype.: martong.
Oct 18 2021, 9:15 AM · Restricted Project
balazske requested review of D112013: [clang][ASTImporter] Fix for importing functions with EST_Unevaluated prototype..
Oct 18 2021, 9:13 AM · Restricted Project

Oct 12 2021

balazske committed rGa76cfc2e840f: [clang-tidy] Update documentation of check bugprone-unused-return-value [NFC]. (authored by balazske).
[clang-tidy] Update documentation of check bugprone-unused-return-value [NFC].
Oct 12 2021, 7:29 AM
balazske closed D111623: [clang-tidy] Update documentation of check bugprone-unused-return-value [NFC]..
Oct 12 2021, 7:29 AM · Restricted Project
balazske added reviewers for D111623: [clang-tidy] Update documentation of check bugprone-unused-return-value [NFC].: martong, aaron.ballman.
Oct 12 2021, 2:39 AM · Restricted Project
balazske abandoned D111228: [clang-tidy] Add options to bugprone-unused-return-value..

Checker configuration can be solved in reusable way by introducing "configuration variables" and manipulation of these with set operations.

Oct 12 2021, 2:38 AM · Restricted Project
balazske requested review of D111623: [clang-tidy] Update documentation of check bugprone-unused-return-value [NFC]..
Oct 12 2021, 2:35 AM · Restricted Project

Oct 11 2021

balazske added inline comments to D111542: [analyzer] Retrieve incomplete array extent from its redeclaration..
Oct 11 2021, 9:35 AM · Restricted Project
balazske added inline comments to D111535: [analyzer] Allow matching non-CallExprs using CallDescriptions.
Oct 11 2021, 9:21 AM · Restricted Project
balazske added a comment to D111228: [clang-tidy] Add options to bugprone-unused-return-value..

I think a configuration option that depends on configuration of another check causes too many problems. It causes dependencies between checks, possible circular dependency (that is an error). What if the other check is not enabled (if a check configuration depends on other it may mean that these two belong together and should both be enabled, or not)? It becomes less clear from where a value comes.

Oct 11 2021, 12:01 AM · Restricted Project

Oct 8 2021

balazske added a comment to D111228: [clang-tidy] Add options to bugprone-unused-return-value..

Probably it can work to only have a "add" or "remove" possibility in the config string, and not using an option name like in the provided example. Otherwise it can be possible to mix string lists from different checks, that seems to be a difficult problem. Other solution is to have a special list (or set) configuration format.

Oct 8 2021, 9:25 AM · Restricted Project
balazske updated the diff for D111228: [clang-tidy] Add options to bugprone-unused-return-value..

Using StringRef, added documentation (untested).

Oct 8 2021, 12:39 AM · Restricted Project

Oct 7 2021

balazske committed rGb7ac68d01ef9: [clang][ASTImporter] Simplify code of attribute import [NFC]. (authored by balazske).
[clang][ASTImporter] Simplify code of attribute import [NFC].
Oct 7 2021, 3:53 AM
balazske closed D110810: [clang][ASTImporter] Simplify code of attribute import [NFC]..
Oct 7 2021, 3:53 AM · Restricted Project

Oct 6 2021

balazske added reviewers for D111228: [clang-tidy] Add options to bugprone-unused-return-value.: aaron.ballman, martong, jranieri-grammatech, sammccall.

These options are added to make the configuration more comfortable if only functions are to be added or removed from the list. I plan another commit that extends the list of checked functions significantly (to include all or some of the functions listed in CERT ERR33-C) (but after looking at D76083 I am not sure).

Oct 6 2021, 7:01 AM · Restricted Project
balazske requested review of D111228: [clang-tidy] Add options to bugprone-unused-return-value..
Oct 6 2021, 6:24 AM · Restricted Project

Oct 5 2021

balazske committed rGbcefea80a40e: [clang][ASTImporter] Add import of thread safety attributes. (authored by balazske).
[clang][ASTImporter] Add import of thread safety attributes.
Oct 5 2021, 3:54 AM
balazske closed D110528: [clang][ASTImporter] Add import of thread safety attributes..
Oct 5 2021, 3:54 AM · Restricted Project
balazske updated the diff for D110810: [clang][ASTImporter] Simplify code of attribute import [NFC]..

Adding && and new asserts to use AttrImporter only once.

Oct 5 2021, 3:35 AM · Restricted Project

Oct 1 2021

balazske committed rGcad9ff531c71: [clang][ASTImporter] Import ConstructorUsingShadowDecl correctly. (authored by balazske).
[clang][ASTImporter] Import ConstructorUsingShadowDecl correctly.
Oct 1 2021, 2:27 AM
balazske closed D110398: [clang][ASTImporter] Import ConstructorUsingShadowDecl correctly..
Oct 1 2021, 2:27 AM · Restricted Project
balazske updated the diff for D110810: [clang][ASTImporter] Simplify code of attribute import [NFC]..

Update the code comments.

Oct 1 2021, 1:14 AM · Restricted Project
balazske updated the diff for D110810: [clang][ASTImporter] Simplify code of attribute import [NFC]..

AttrImporter owns now the result of import (until it is read),
instead of referenced error and returned pointer.

Oct 1 2021, 1:06 AM · Restricted Project
balazske committed rGa3a0b066264f: [clang][ASTImporter] Import InheritedConstructor and ConstructorUsingShadowDecl. (authored by martong).
[clang][ASTImporter] Import InheritedConstructor and ConstructorUsingShadowDecl.
Oct 1 2021, 1:02 AM
balazske closed D110395: [clang][ASTImporter] Import InheritedConstructor and ConstructorUsingShadowDecl..
Oct 1 2021, 1:02 AM · Restricted Project

Sep 30 2021

balazske retitled D110810: [clang][ASTImporter] Simplify code of attribute import [NFC]. from [clang][ASTImporter] Simplify code of attribute import. to [clang][ASTImporter] Simplify code of attribute import [NFC]..
Sep 30 2021, 6:28 AM · Restricted Project
balazske added reviewers for D110810: [clang][ASTImporter] Simplify code of attribute import [NFC].: martong, steakhal.
Sep 30 2021, 4:01 AM · Restricted Project
balazske requested review of D110810: [clang][ASTImporter] Simplify code of attribute import [NFC]..
Sep 30 2021, 3:57 AM · Restricted Project

Sep 28 2021

balazske added a comment to D110528: [clang][ASTImporter] Add import of thread safety attributes..

If the ASTImporter and parts of ASTNodeImporter are made public API then it can be possible to add generation of import code to the .td files, this should be the best solution. In similar way, import of Stmt and Expr nodes can be generated if possible. These imports are mechanical tasks that can be automated, probably with some exceptions.

Sep 28 2021, 2:42 AM · Restricted Project

Sep 27 2021

balazske added a comment to D110528: [clang][ASTImporter] Add import of thread safety attributes..

The code can be made better in a way that only lines similar to

Expected<Attr *> ToAttrOrErr = AI.createImportedAttr(
    From, AI.importArg(From->getSuccessValue()).value(),
    AI.importArrayArg(From->args(), From->args_size()).value(),
    From->args_size());

are needed. If there is an AttrVisitor the switch can be removed. No one import function is possible that works with every Attr, in the same way as there is a separate function for import of every Stmt (Decl and others are more complicated) there must be something for every Attr (if it has custom arguments). Even now the import of an Attr needs much less code than import of a Stmt (that could be done in similar way). There are cases that need special handling, like AlignedAttr. If the current code is included we can see enough cases to make a better generalization, but after splitting the ASTImporter.cpp into multiple files.

Sep 27 2021, 6:04 AM · Restricted Project
balazske added reviewers for D110528: [clang][ASTImporter] Add import of thread safety attributes.: martong, steakhal.
Sep 27 2021, 3:17 AM · Restricted Project
balazske requested review of D110528: [clang][ASTImporter] Add import of thread safety attributes..
Sep 27 2021, 3:15 AM · Restricted Project

Sep 24 2021

balazske added a reviewer for D110398: [clang][ASTImporter] Import ConstructorUsingShadowDecl correctly.: martong.
Sep 24 2021, 3:09 AM · Restricted Project
balazske requested review of D110398: [clang][ASTImporter] Import ConstructorUsingShadowDecl correctly..
Sep 24 2021, 3:06 AM · Restricted Project
balazske added a reviewer for D110395: [clang][ASTImporter] Import InheritedConstructor and ConstructorUsingShadowDecl.: martong.
Sep 24 2021, 3:05 AM · Restricted Project
balazske requested review of D110395: [clang][ASTImporter] Import InheritedConstructor and ConstructorUsingShadowDecl..
Sep 24 2021, 3:01 AM · Restricted Project

Sep 22 2021

balazske committed rG7ce638538bcf: [clang][ASTImporter] Generic attribute import handling (first step). (authored by balazske).
[clang][ASTImporter] Generic attribute import handling (first step).
Sep 22 2021, 1:00 AM
balazske closed D109608: [clang][ASTImporter] Generic attribute import handling (first step)..
Sep 22 2021, 1:00 AM · Restricted Project

Sep 21 2021

balazske updated the diff for D109608: [clang][ASTImporter] Generic attribute import handling (first step)..

Dump to 'llvm::nulls()'.

Sep 21 2021, 7:26 AM · Restricted Project

Sep 20 2021

balazske added inline comments to D109608: [clang][ASTImporter] Generic attribute import handling (first step)..
Sep 20 2021, 2:30 AM · Restricted Project
balazske added inline comments to D109608: [clang][ASTImporter] Generic attribute import handling (first step)..
Sep 20 2021, 2:22 AM · Restricted Project
balazske updated the diff for D109608: [clang][ASTImporter] Generic attribute import handling (first step)..

Fixed review issues.
Added code comments.

Sep 20 2021, 2:22 AM · Restricted Project
balazske added inline comments to D109269: [NFC] Cleanup the overload of ASTImporter::import().
Sep 20 2021, 1:27 AM · Restricted Project

Sep 17 2021

balazske added a comment to D106262: [clang][analyzer] Use generic note tag in alpha.unix.Stream ..

I'd like to test cases where the very same function call gets a different note message depending on the BugType:

These tests are doing this:

void check_indeterminate_notes_fseek_no_feof_no_ferror() {
  FILE *F;
  char Buf[10];
  F = fopen("foo1.c", "r");
  if (!F) // expected-note {{Taking false branch}} expected-note {{'F' is non-null}}
    return;
  fseek(F, 1, SEEK_SET);      // expected-note {{Assuming this stream operation fails and leaves the file position indeterminate}}
  if (!ferror(F) && !feof(F)) // expected-note {{The error flag is not set on the stream}} expected-note {{The end-of-file flag is not set on the stream}}
                              // expected-note@-1 {{Taking true branch}} expected-note@-1 {{Left side of '&&' is true}}
    fread(Buf, 1, 1, F);      // expected-warning{{File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior}}
  // expected-note@-1{{File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior}}
  fclose(F);
}
Sep 17 2021, 2:29 AM · Restricted Project

Sep 14 2021

balazske added inline comments to D109608: [clang][ASTImporter] Generic attribute import handling (first step)..
Sep 14 2021, 2:44 AM · Restricted Project

Sep 13 2021

balazske added a comment to D106262: [clang][analyzer] Use generic note tag in alpha.unix.Stream ..

Probably it is better to make a big comment at the start of the file that explains how the checker works, like in FuchsiaHandleChecker. This comes in a separate patch.

Sep 13 2021, 8:51 AM · Restricted Project

Sep 10 2021

balazske requested review of D109608: [clang][ASTImporter] Generic attribute import handling (first step)..
Sep 10 2021, 9:04 AM · Restricted Project

Sep 2 2021

balazske updated the diff for D106262: [clang][analyzer] Use generic note tag in alpha.unix.Stream ..

Using again bug type dependent note tag messages.
Some new tests are added.
The planned debug functions are not added yet.

Sep 2 2021, 1:59 AM · Restricted Project

Sep 1 2021

balazske added a comment to D106262: [clang][analyzer] Use generic note tag in alpha.unix.Stream ..

The following test is not good in place of the 3rd? It is nearly the same, only the condition (!ferror(F) && !feof(F)) is used instead of call to clearerr.

void check_indeterminate_notes_fseek_no_feof_no_ferror() {
  FILE *F;
  char Buf[10];
  F = fopen("foo1.c", "r");
  if (!F) // expected-note {{Taking false branch}} expected-note {{'F' is non-null}}
    return;
  fseek(F, 1, SEEK_SET);      // expected-note {{Assuming this stream operation fails}}
  if (!ferror(F) && !feof(F)) // expected-note {{Taking true branch}} // expected-note {{Left side of '&&' is true}}
    fread(Buf, 1, 1, F);      // expected-warning {{File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior}}
  // expected-note@-1 {{File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior}}
  fclose(F);
}

The condition can be changed to feof(F) or ferror(F) to change the bug type and the note message at fseek.

Sep 1 2021, 7:07 AM · Restricted Project