Commit Graph

24 Commits

Author SHA1 Message Date
Anthony Latsis
a84dfc8387 [Gardening] Fix some set but not used variables 2025-01-30 21:34:38 +00:00
Tim Kientzle
1d961ba22d Add #include "swift/Basic/Assertions.h" to a lot of source files
Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
2024-06-05 19:37:30 -07:00
Alex Hoppen
c00428a1f4 [IDE] New test cases that were failing at some point during solver-based migration 2023-07-07 19:51:01 +02:00
Robert Widmann
91c262bcb7 Move TokenKinds.def.gyb to AST 2022-11-16 13:38:25 -08:00
Alex Hoppen
5f4725251b [AST] Don’t crash when dumping null ASTNodes 2022-07-11 11:44:30 +02:00
Pavel Yaskevich
0cc8bc7928 [CSClosure] SE-0326: Type-checker statement conditions individually
Instead of referencing whole statement condition, break it down to
individual elements and solve them separately.

Resolves: rdar://88720312
2022-02-12 10:01:58 -08:00
Pavel Yaskevich
df00e3efbe [ASTNode] Add a new element - case item 2021-10-08 10:08:02 -07:00
Pavel Yaskevich
15aa8edf75 [ASTNode] Add a new element - statement condition 2021-10-08 10:08:01 -07:00
Anthony Latsis
4b4634141f Sema: Remove TypeLoc from ExplicitCast 2020-06-09 15:20:25 +03:00
Pavel Yaskevich
87b8f79d2c [AST] Extend ASTNode to support Pattern/TypeLoc 2020-04-29 17:03:45 -07:00
Brent Royal-Gordon
e6af2e4ad9 Add ASTNode.dump() methods 2019-02-17 22:14:21 -08:00
Adrian Prantl
ff63eaea6f Remove \brief commands from doxygen comments.
We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.

Patch produced by

      for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done
2018-12-04 15:45:04 -08:00
Slava Pestov
0715eaeaed AST: Move SourceEntityWalker to IDE 2017-11-13 22:10:41 -08:00
practicalswift
492f5cd35a [gardening] Remove redundant repetition of type names (DRY): RepeatedTypeName foo = dyn_cast<RepeatedTypeName>(bar)
Replace `NameOfType foo = dyn_cast<NameOfType>(bar)` with DRY version `auto foo = dyn_cast<NameOfType>(bar)`.

The DRY auto version is by far the dominant form already used in the repo, so this PR merely brings the exceptional cases (redundant repetition form) in line with the dominant form (auto form).

See the [C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#es11-use-auto-to-avoid-redundant-repetition-of-type-names) for a general discussion on why to use `auto` to avoid redundant repetition of type names.
2017-05-05 09:45:53 +02:00
Xi Ge
57fa43c9af [RangeInfo] Avoid analyzing implicit ASTNodes. rdar://31773556 (#9210) 2017-05-02 21:19:46 -07:00
Xi Ge
1ef97c0024 RangeInfo: Rework the criterion for valid selection of multiple statements, i.e. they should have a common brace statement as parent. (#8129) 2017-03-15 18:23:24 -07:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
Xi Ge
46eb3971f5 [RangeInfo] Some enrichment on reported range info. (#6475)
* [RangeInfo] Perform complete walk on the last node in a given range to avoid missing information due to early abort.

* [RangeInfo] For declared decls in a given range, report whether they are referenced outside of the range.

* [RangeInfo] Report the contained (topmost) ASTNodes inside a selected range.
2017-01-03 16:33:39 -08:00
Xi Ge
94851e25d7 [RangeInfo] Report the innermost decl context for the range under selection. (#6448) 2016-12-21 16:50:39 -08:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
practicalswift
8efa5f587e [gardening] Remove "-*- C++ -*-" tag from .cpp files
Emacs assumes .h files are C files by default which is why the
tag "-*- C++ -*-" is needed.

.cpp files do not have this problem.
2016-01-23 12:09:32 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
Justin Bogner
a49008298e InstrProf: Set up the basic infrastructure for profiling swift
This adds the -profile-generate flag, which enables LLVM's
instrumentation based profiling. It implements the instrumentation
for basic control flow, such as if statements, loops, and closures.

Swift SVN r25155
2015-02-11 01:06:18 +00:00
Anna Zaks
54524e622a Replace ExprStmtOrDecl with ASTNode and make it a struct.
Previously, the Parser and BranchStmt typedef-ed ExprStmtOrDecl as a pointer union. Using typedef made the objects compatible, but did not allow us to extend the type with helper methods, such as getSourceRange(), which is something you can get on all of the AST objects. This patch introduces ASTNode that subclasses from PointerUnion and is used by both parser and BranchStmt.

Swift SVN r9971
2013-11-05 21:46:59 +00:00