History log of /llvm-project/clang/lib/Format/Format.cpp (Results 626 – 650 of 1154)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-3.5.0
# 49cc3181 27-Aug-2014 David Blaikie <dblaikie@gmail.com>

Overload SourceManager::overrideFileContents so that unconditionally passing ownership is explicitly done using unique_ptr.

Only those callers who are dynamically passing ownership should need the
3

Overload SourceManager::overrideFileContents so that unconditionally passing ownership is explicitly done using unique_ptr.

Only those callers who are dynamically passing ownership should need the
3 argument form. Those accepting the default ("do pass ownership")
should do so explicitly with a unique_ptr now.

llvm-svn: 216614

show more ...


Revision tags: llvmorg-3.5.0-rc4
# d87f8d76 27-Aug-2014 Rafael Espindola <rafael.espindola@gmail.com>

Update for LLVM api change.

llvm-svn: 216585


# ad981f88 26-Aug-2014 Daniel Jasper <djasper@google.com>

clang-format: New option SpacesInSquareBrackets.

Before:
int a[5];
a[3] += 42;

After:
int a[ 5 ];
a[ 3 ] += 42;

Fixes LLVM bug #17887 (http://llvm.org/bugs/show_bug.cgi?id=17887).

Patch b

clang-format: New option SpacesInSquareBrackets.

Before:
int a[5];
a[3] += 42;

After:
int a[ 5 ];
a[ 3 ] += 42;

Fixes LLVM bug #17887 (http://llvm.org/bugs/show_bug.cgi?id=17887).

Patch by Marek Kurdej, thank you!

llvm-svn: 216449

show more ...


Revision tags: llvmorg-3.5.0-rc3
# dd69ef38 19-Aug-2014 Aaron Ballman <aaron@aaronballman.com>

C++1y is now C++14!

Changes diagnostic options, language standard options, diagnostic identifiers, diagnostic wording to use c++14 instead of c++1y. It also modifies related test cases to use the up

C++1y is now C++14!

Changes diagnostic options, language standard options, diagnostic identifiers, diagnostic wording to use c++14 instead of c++1y. It also modifies related test cases to use the updated diagnostic wording.

llvm-svn: 215982

show more ...


Revision tags: llvmorg-3.5.0-rc2
# 7160c4d2 06-Aug-2014 NAKAMURA Takumi <geek4civic@gmail.com>

FormatTokenLexer: Avoid non-static member initializer.

llvm-svn: 214976


# 47189443 06-Aug-2014 Daniel Jasper <djasper@google.com>

clang-format: Add special comments to disable formatting.

With this patch:
int ThisWillBeFormatted;
// clang-format off
int ThisWontBeFormatted;
// clang-format on
int Formatted;

This i

clang-format: Add special comments to disable formatting.

With this patch:
int ThisWillBeFormatted;
// clang-format off
int ThisWontBeFormatted;
// clang-format on
int Formatted;

This is for regions where a significantly nicer code layout can be found
knowing the content of the code.

This fixes llvm.org/PR20463.

llvm-svn: 214966

show more ...


# ca4ea1ce 05-Aug-2014 Daniel Jasper <djasper@google.com>

clang-format: Add option to always break after a function's return type.

This is required for GNU coding style, among others.

Also update the configuration documentation.

Modified from an original

clang-format: Add option to always break after a function's return type.

This is required for GNU coding style, among others.

Also update the configuration documentation.

Modified from an original patch by Jarkko Hietaniemi, thank you!

llvm-svn: 214858

show more ...


Revision tags: llvmorg-3.5.0-rc1
# 958027b6 14-Jul-2014 Alp Toker <alp@nuanti.com>

Fix typos

Also consolidate 'backward compatibility'

llvm-svn: 212974


# c75e1eff 09-Jul-2014 Daniel Jasper <djasper@google.com>

clang-format: Add new option to indent wrapped function declarations.

Though not completely identical, make former
IndentFunctionDeclarationAfterType change this flag for backwards
compatibility (it

clang-format: Add new option to indent wrapped function declarations.

Though not completely identical, make former
IndentFunctionDeclarationAfterType change this flag for backwards
compatibility (it is somewhat close in meaning and better the err'ing on
an unknown config flag).

llvm-svn: 212597

show more ...


# 4355e7f0 09-Jul-2014 Daniel Jasper <djasper@google.com>

clang-format: Revamp function declaration/definition indentation.

Key changes:
- Correctly (well ...) distinguish function declarations and variable
declarations with ()-initialization.
- Don't in

clang-format: Revamp function declaration/definition indentation.

Key changes:
- Correctly (well ...) distinguish function declarations and variable
declarations with ()-initialization.
- Don't indent when breaking function declarations/definitions after the
return type.
- Indent variable declarations and typedefs when breaking after the
type.

This fixes llvm.org/PR17999.

llvm-svn: 212591

show more ...


# 2d2b420a 06-Jul-2014 Rafael Espindola <rafael.espindola@gmail.com>

Update for llvm api change.

llvm-svn: 212408


# 553d4878 17-Jun-2014 Daniel Jasper <djasper@google.com>

clang-format: Introduce style with spaces on both sides of */&.

Patch by Janusz Sobczak (slightly extended).
This fixes llvm.org/19929.

llvm-svn: 211098


# fbfbaf6a 12-Jun-2014 Saleem Abdulrasool <compnerd@compnerd.org>

Permit -Wswitch coverage for enumerations.

Thanks to David Blakie and Richard Smith for pointing out that we can retain the
-Wswitch coverage while avoiding the warning from GCC by pushing the unrea

Permit -Wswitch coverage for enumerations.

Thanks to David Blakie and Richard Smith for pointing out that we can retain the
-Wswitch coverage while avoiding the warning from GCC by pushing the unreachable
outside of the switch!

llvm-svn: 210812

show more ...


# c9340d25 12-Jun-2014 Saleem Abdulrasool <compnerd@compnerd.org>

Basic: fix warnings from GCC

tools/clang/lib/Basic/DiagnosticIDs.cpp: In function ‘clang::DiagnosticIDs::Level toLevel(clang::diag::Severity)’:
tools/clang/lib/Basic/DiagnosticIDs.cpp:382:1: warning

Basic: fix warnings from GCC

tools/clang/lib/Basic/DiagnosticIDs.cpp: In function ‘clang::DiagnosticIDs::Level toLevel(clang::diag::Severity)’:
tools/clang/lib/Basic/DiagnosticIDs.cpp:382:1: warning: control reaches end of non-void function [-Wreturn-type]

tools/clang/lib/Format/Format.cpp: In member function ‘virtual std::string clang::format::ParseErrorCategory::message(int) const’:
tools/clang/lib/Format/Format.cpp:282:1: warning: control reaches end of non-void function [-Wreturn-type]

Add a default cases that asserts that we handle the severity, parse error.

llvm-svn: 210804

show more ...


# c080917e 12-Jun-2014 Rafael Espindola <rafael.espindola@gmail.com>

Replace llvm::error_code with std::error_code.

llvm-svn: 210780


# 6d0d89b4 12-Jun-2014 Rafael Espindola <rafael.espindola@gmail.com>

Fix typo.

Thanks to Alp Toker for noticing.

llvm-svn: 210744


# d0136707 12-Jun-2014 Rafael Espindola <rafael.espindola@gmail.com>

Give clang-format its own error category.

The posix errno values are probably to the best thing to use for
describing parse errors.

This should also fix the mingw build.

llvm-svn: 210739


# 96b03300 11-Jun-2014 Rafael Espindola <rafael.espindola@gmail.com>

Use std::error_code instead of llvm::error_code.

This is an update for a llvm api change.

llvm-svn: 210688


# 58cb2edd 06-Jun-2014 Daniel Jasper <djasper@google.com>

clang-format: Fix incorrect indentation.

Before (JavaScript example, but can extend to other languages):
return {
a: 'E',
b: function() {
return function() {
f(); // This is w

clang-format: Fix incorrect indentation.

Before (JavaScript example, but can extend to other languages):
return {
a: 'E',
b: function() {
return function() {
f(); // This is wrong.
};
}
};

After:
return {
a: 'E',
b: function() {
return function() {
f(); // This is better.
};
}
};

llvm-svn: 210334

show more ...


# cb82dfb1 31-May-2014 Rafael Espindola <rafael.espindola@gmail.com>

Use error_code() instead of error_code::succes()

There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.

llvm-svn: 209949


# 0a0d6b4b 22-May-2014 Alexander Kornienko <alexfh@google.com>

Use error_code::success() instead of make_error_code(llvm::errc::success).

llvm-svn: 209477


# c64b09ac 22-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Introduce DisableFormat that prevents formatting.

And "none" pseudo-style indicating that formatting should be not
applied.

(1) Using .clang-format with "DisableFormat: true" effectiv

clang-format: Introduce DisableFormat that prevents formatting.

And "none" pseudo-style indicating that formatting should be not
applied.

(1) Using .clang-format with "DisableFormat: true" effectively prevents
formatting for all files within the folder containing such .clang-format
file.

(2) Using -fallback-style=none together with -style=file prevents
formatting when .clang-format is not found, which can be used in on-save
callback.

Patch by Adam Strzelecki. Thank you!

llvm-svn: 209446

show more ...


# bd630737 22-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Fix corner case in AllowShortBlocksOnASingleLine.

Before:
template <int> struct A4 { A4() { }
};

After:
template <int i> struct A4 {
A4() {}
};

This fixes llvm.org/PR1981

clang-format: Fix corner case in AllowShortBlocksOnASingleLine.

Before:
template <int> struct A4 { A4() { }
};

After:
template <int i> struct A4 {
A4() {}
};

This fixes llvm.org/PR19813 (at least the part that isn't working as
intended).

llvm-svn: 209438

show more ...


# 1f6c7e93 22-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Store pointers to seen formatting states.

As the memory ownership is handled by the SpecificBumpPtrAllocator
anyway, there is no need to duplicate states when inserting them into
the S

clang-format: Store pointers to seen formatting states.

As the memory ownership is handled by the SpecificBumpPtrAllocator
anyway, there is no need to duplicate states when inserting them into
the Seen-set. This leads to an improvement of ~10% on the benchmark
formatting file.

No functional changes intended.

llvm-svn: 209422

show more ...


# 3948516a 22-May-2014 Daniel Jasper <djasper@google.com>

clang-format: Correctly identify multiplications in braces init lists.

Before:
int i{a *b};

After:
int i{a * b};

Also fix unrelated issue where braced init lists were counted as blocks
and pre

clang-format: Correctly identify multiplications in braces init lists.

Before:
int i{a *b};

After:
int i{a * b};

Also fix unrelated issue where braced init lists were counted as blocks
and prevented single-line functions.

llvm-svn: 209412

show more ...


1...<<21222324252627282930>>...47