Skip to content

Commit

Permalink
More workarounds for broken clang-tidy check
Browse files Browse the repository at this point in the history
  • Loading branch information
MikePopoloski committed Sep 23, 2023
1 parent b93ea77 commit e17a9d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Checks: >
-clang-analyzer-core.UndefinedBinaryOperatorResult,
-clang-analyzer-core.uninitialized.Assign,
-clang-analyzer-optin.cplusplus.UninitializedObject,
-clang-diagnostic-unknown-pragmas,
-misc-non-private-member-variables-in-classes,
-misc-no-recursion,
-misc-const-correctness,
Expand Down
8 changes: 6 additions & 2 deletions include/slang/parsing/Token.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ struct SLANG_EXPORT NumericTokenFlags {
/// character, or a comment.
class SLANG_EXPORT Trivia {
private:
#pragma pack(push, 4)
#ifndef __clang_analyzer__
# pragma pack(push, 4)
#endif
struct ShortStringView {
const char* ptr;
uint32_t len;
Expand All @@ -70,7 +72,9 @@ class SLANG_EXPORT Trivia {
syntax::SyntaxNode* syntaxNode;
FullLocation* fullLocation;
};
#pragma pack(pop)
#ifndef __clang_analyzer__
# pragma pack(pop)
#endif

// The vast majority of trivia lives alongside the token it's attached to, so if
// you want to know its source location just walk backward from the parent location.
Expand Down

0 comments on commit e17a9d5

Please sign in to comment.